From 885ace111e115454554dfa0f8fd8bb2b33271097 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 4 Aug 2020 08:56:30 -0400 Subject: [PATCH] Fix toolbar being expanded when opening preference dialogs --- app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 4 ++++ .../kanade/tachiyomi/ui/setting/SettingsTrackingController.kt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 53559dd394..f34604e92b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -9,6 +9,7 @@ import android.view.ViewGroup import android.widget.Toast import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.view.isVisible +import androidx.preference.PreferenceDialogController import com.bluelinelabs.conductor.Conductor import com.bluelinelabs.conductor.Controller import com.bluelinelabs.conductor.ControllerChangeHandler @@ -317,6 +318,9 @@ class MainActivity : BaseActivity() { if (from is DialogController || to is DialogController) { return } + if (from is PreferenceDialogController || to is PreferenceDialogController) { + return + } supportActionBar?.setDisplayHomeAsUpEnabled(router.backstackSize != 1) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt index 3831905e2c..d61cce20ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt @@ -11,6 +11,8 @@ import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.data.track.anilist.AnilistApi import eu.kanade.tachiyomi.data.track.bangumi.BangumiApi import eu.kanade.tachiyomi.data.track.shikimori.ShikimoriApi +import eu.kanade.tachiyomi.ui.setting.track.TrackLoginDialog +import eu.kanade.tachiyomi.ui.setting.track.TrackLogoutDialog import eu.kanade.tachiyomi.util.preference.defaultValue import eu.kanade.tachiyomi.util.preference.infoPreference import eu.kanade.tachiyomi.util.preference.initThenAdd @@ -20,8 +22,6 @@ import eu.kanade.tachiyomi.util.preference.switchPreference import eu.kanade.tachiyomi.util.preference.titleRes import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.widget.preference.LoginPreference -import eu.kanade.tachiyomi.ui.setting.track.TrackLoginDialog -import eu.kanade.tachiyomi.ui.setting.track.TrackLogoutDialog import uy.kohesive.injekt.injectLazy class SettingsTrackingController :