瀏覽代碼

Hide toolbars when reader color filter sheet is opened

arkon 4 年之前
父節點
當前提交
66ef1a8206
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

+ 7 - 2
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

@@ -233,10 +233,15 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
             }
             }
             R.id.action_settings -> ReaderSettingsSheet(this).show()
             R.id.action_settings -> ReaderSettingsSheet(this).show()
             R.id.action_custom_filter -> {
             R.id.action_custom_filter -> {
-                ReaderColorFilterSheet(this)
+                val sheet = ReaderColorFilterSheet(this)
                     // Remove dimmed backdrop so changes can be previewd
                     // Remove dimmed backdrop so changes can be previewd
                     .apply { window?.setDimAmount(0f) }
                     .apply { window?.setDimAmount(0f) }
-                    .show()
+
+                // Hide toolbars while sheet is open for better preview
+                sheet.setOnDismissListener { setMenuVisibility(true) }
+                setMenuVisibility(false)
+
+                sheet.show()
             }
             }
         }
         }
         return super.onOptionsItemSelected(item)
         return super.onOptionsItemSelected(item)