diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt index e53602a75e..5b0172b095 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt @@ -4,6 +4,7 @@ import android.content.Context import android.util.AttributeSet import androidx.appcompat.graphics.drawable.DrawerArrowDrawable import com.google.android.material.appbar.MaterialToolbar +import eu.kanade.tachiyomi.util.view.gone import kotlinx.android.synthetic.main.main_activity.view.* class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : @@ -13,6 +14,7 @@ class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: Attribut if (navigationIcon is DrawerArrowDrawable) { super.setTitle(resId) toolbar_title.text = null + dropdown?.gone() } else { toolbar_title.text = context.getString(resId) super.setTitle(null) @@ -23,6 +25,7 @@ class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: Attribut if (navigationIcon is DrawerArrowDrawable) { super.setTitle(title) toolbar_title.text = "" + dropdown?.gone() } else { toolbar_title.text = title super.setTitle(null) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index e10c6eb25c..38976de894 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -518,6 +518,13 @@ class LibraryController( } } + override fun onChangeEnded(handler: ControllerChangeHandler, type: ControllerChangeType) { + super.onChangeEnded(handler, type) + if (!type.isEnter) { + activity?.dropdown?.gone() + } + } + override fun onActivityResumed(activity: Activity) { super.onActivityResumed(activity) if (view == null) return