From 80ab179477a25d20ce2689da0b58de51f3b11421 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 14 Sep 2019 11:29:20 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/storage/Backup.kt | 9 +++++++++ app/src/main/res/menu/read_book.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/storage/Backup.kt b/app/src/main/java/io/legado/app/help/storage/Backup.kt index 0f55ac786..1cb43a8db 100644 --- a/app/src/main/java/io/legado/app/help/storage/Backup.kt +++ b/app/src/main/java/io/legado/app/help/storage/Backup.kt @@ -1,5 +1,8 @@ package io.legado.app.help.storage +import io.legado.app.App +import io.legado.app.utils.GSON + object Backup { fun backup() { @@ -9,4 +12,10 @@ object Backup { fun autoBackup() { } + + private fun backupBookshelf() { + val books = App.db.bookDao().allBooks + val json = GSON.toJson(books) + + } } \ No newline at end of file diff --git a/app/src/main/res/menu/read_book.xml b/app/src/main/res/menu/read_book.xml index 8b95f1d3a..d8ea10f3d 100644 --- a/app/src/main/res/menu/read_book.xml +++ b/app/src/main/res/menu/read_book.xml @@ -1,7 +1,7 @@ + tools:context=".ui.main.MainActivity">