mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 00:05:08 +01:00
Fixed #311
This commit is contained in:
parent
10d6a04051
commit
b16ffe020e
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user