mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 07:35:06 +01:00
Reselecting a tab in browse scrolls to top
This commit is contained in:
parent
283808a865
commit
7d9c77f021
@ -29,6 +29,7 @@ import eu.kanade.tachiyomi.util.view.collapse
|
|||||||
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets
|
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets
|
||||||
import eu.kanade.tachiyomi.util.view.expand
|
import eu.kanade.tachiyomi.util.view.expand
|
||||||
import eu.kanade.tachiyomi.util.view.isExpanded
|
import eu.kanade.tachiyomi.util.view.isExpanded
|
||||||
|
import eu.kanade.tachiyomi.util.view.smoothScrollToTop
|
||||||
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
|
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
|
||||||
import eu.kanade.tachiyomi.util.view.withFadeTransaction
|
import eu.kanade.tachiyomi.util.view.withFadeTransaction
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
@ -131,6 +132,12 @@ class ExtensionBottomSheet @JvmOverloads constructor(context: Context, attrs: At
|
|||||||
else -> migrationFrameLayout
|
else -> migrationFrameLayout
|
||||||
}?.binding?.recycler?.isNestedScrollingEnabled = true
|
}?.binding?.recycler?.isNestedScrollingEnabled = true
|
||||||
sheetBehavior?.isDraggable = true
|
sheetBehavior?.isDraggable = true
|
||||||
|
if (!isExpanding) {
|
||||||
|
when (tab?.position) {
|
||||||
|
0 -> extensionFrameLayout
|
||||||
|
else -> migrationFrameLayout
|
||||||
|
}?.binding?.recycler?.smoothScrollToTop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
presenter.onCreate()
|
presenter.onCreate()
|
||||||
|
Loading…
Reference in New Issue
Block a user