feat: 优化代码

pull/182/head
kunfei 5 years ago
parent 01c4d2961c
commit 04c46ab07c
  1. 12
      app/build.gradle
  2. 6
      app/src/google/res/values/strings.xml
  3. 1
      app/src/main/java/io/legado/app/constant/AppConst.kt
  4. 3
      app/src/main/java/io/legado/app/data/dao/BookDao.kt

@ -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

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">阅读Pro</string>
</resources>

@ -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

@ -18,6 +18,9 @@ interface BookDao {
@Query("SELECT * FROM books WHERE origin = '${BookType.local}'")
fun observeLocal(): LiveData<List<Book>>
@Query("SELECT * FROM books WHERE (`group` & (SELECT sum(groupId) FROM book_groups)) > 0")
fun observeNoneGroup(): LiveData<List<Book>>
@Query("SELECT bookUrl FROM books WHERE origin = '${BookType.local}'")
fun observeLocalUri(): LiveData<List<String>>

Loading…
Cancel
Save