From 04c46ab07c0580d587ee813390878958876185bd Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 6 Apr 2020 16:48:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 12 ++++++------ app/src/google/res/values/strings.xml | 6 ++++++ app/src/main/java/io/legado/app/constant/AppConst.kt | 1 + app/src/main/java/io/legado/app/data/dao/BookDao.kt | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 app/src/google/res/values/strings.xml diff --git a/app/build.gradle b/app/build.gradle index 9175af2d1..db2d93c2f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -74,13 +74,13 @@ android { } } } - productFlavors{ - app{ - manifestPlaceholders = [APP_CHANNEL_VALUE:"app"] + productFlavors { + app { + manifestPlaceholders = [APP_CHANNEL_VALUE: "app"] } - google{ + google { applicationId "io.legado.play" - manifestPlaceholders = [APP_CHANNEL_VALUE:"google"] + manifestPlaceholders = [APP_CHANNEL_VALUE: "google"] } } compileOptions { @@ -115,7 +115,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" //fireBase - implementation 'com.google.firebase:firebase-core:17.2.3' + implementation 'com.google.firebase:firebase-core:17.3.0' implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' //androidX diff --git a/app/src/google/res/values/strings.xml b/app/src/google/res/values/strings.xml new file mode 100644 index 000000000..ed2d735c4 --- /dev/null +++ b/app/src/google/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + 阅读Pro + + \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt index 810e6deb2..57724c62f 100644 --- a/app/src/main/java/io/legado/app/constant/AppConst.kt +++ b/app/src/main/java/io/legado/app/constant/AppConst.kt @@ -49,6 +49,7 @@ object AppConst { val bookGroupAll = BookGroup(-1, App.INSTANCE.getString(R.string.all)) val bookGroupLocal = BookGroup(-2, App.INSTANCE.getString(R.string.local)) val bookGroupAudio = BookGroup(-3, App.INSTANCE.getString(R.string.audio)) + val bookGroupNone = BookGroup(-4, App.INSTANCE.getString(R.string.no_group)) const val notificationIdRead = 1144771 const val notificationIdAudio = 1144772 diff --git a/app/src/main/java/io/legado/app/data/dao/BookDao.kt b/app/src/main/java/io/legado/app/data/dao/BookDao.kt index a6a96a37f..253c9b873 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookDao.kt @@ -18,6 +18,9 @@ interface BookDao { @Query("SELECT * FROM books WHERE origin = '${BookType.local}'") fun observeLocal(): LiveData> + @Query("SELECT * FROM books WHERE (`group` & (SELECT sum(groupId) FROM book_groups)) > 0") + fun observeNoneGroup(): LiveData> + @Query("SELECT bookUrl FROM books WHERE origin = '${BookType.local}'") fun observeLocalUri(): LiveData>