pull/2274/head
kunfei 2 years ago
parent 0acb7f2b61
commit e0bbe98c95
  1. 2
      app/src/main/java/io/legado/app/help/config/AppConfig.kt
  2. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  3. 7
      app/src/main/res/menu/book_read.xml

@ -155,7 +155,7 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
get() = appCtx.getPrefBoolean(PreferKey.autoRefresh)
var enableReview: Boolean
get() = appCtx.getPrefBoolean(PreferKey.enableReview, false)
get() = appCtx.getPrefBoolean(PreferKey.enableReview, false) && BuildConfig.DEBUG
set(value) {
appCtx.putPrefBoolean(PreferKey.enableReview, value)
}

@ -256,7 +256,10 @@ class ReadBookActivity : BaseReadBookActivity(),
else -> when (item.itemId) {
R.id.menu_enable_replace -> item.isChecked = book.getUseReplaceRule()
R.id.menu_re_segment -> item.isChecked = book.getReSegment()
R.id.menu_enable_review -> item.isChecked = AppConfig.enableReview
R.id.menu_enable_review -> {
item.isVisible = BuildConfig.DEBUG
item.isChecked = AppConfig.enableReview
}
R.id.menu_reverse_content -> item.isVisible = onLine
}
}

@ -72,23 +72,24 @@
<item
android:id="@+id/menu_enable_replace"
android:title="@string/replace_rule_title"
android:checkable="true"
android:checked="true"
android:title="@string/replace_rule_title"
app:showAsAction="never" />
<item
android:id="@+id/menu_re_segment"
android:title="@string/re_segment"
android:checkable="true"
android:checked="false"
android:title="@string/re_segment"
app:showAsAction="never" />
<item
android:id="@+id/menu_enable_review"
android:title="@string/review"
android:checkable="true"
android:checked="false"
android:title="@string/review"
android:visible="false"
app:showAsAction="never" />
<item

Loading…
Cancel
Save