From 30ac94181b2c410aedead964a815b080ef3e62ee Mon Sep 17 00:00:00 2001 From: Ansh <55742309+anshpathania7@users.noreply.github.com> Date: Fri, 16 Sep 2022 03:11:54 +0530 Subject: [PATCH] Fix stacking of Settings menu in the reader on multiple taps (#8002) * fix : conditional check added to avoid stacking of dialog In onClickListener, bottom sheet is being opened depending on status of dialog sheet, if it's showing or not. * chore : refactored conditional logic * Update ReaderActivity.kt --- .../java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index a1b6725333..d993104ed5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -508,9 +508,11 @@ class ReaderActivity : BaseRxActivity() { // Settings sheet with(binding.actionSettings) { setTooltip(R.string.action_settings) - + val readerSettingSheetDialog = ReaderSettingsSheet(this@ReaderActivity) setOnClickListener { - ReaderSettingsSheet(this@ReaderActivity).show() + if (!readerSettingSheetDialog.isShowing()) { + readerSettingSheetDialog.show() + } } setOnLongClickListener {