mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 11:35:08 +01:00
Fix bottom nav being visible when resuming app (fixes #6012)
This commit is contained in:
parent
727a7e4b2d
commit
4a27f0546c
@ -20,10 +20,10 @@ object NotificationHandler {
|
||||
*/
|
||||
internal fun openDownloadManagerPendingActivity(context: Context): PendingIntent {
|
||||
val intent = Intent(context, MainActivity::class.java).apply {
|
||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
|
||||
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP
|
||||
action = MainActivity.SHORTCUT_DOWNLOADS
|
||||
}
|
||||
return PendingIntent.getActivity(context, 0, intent, 0)
|
||||
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -228,8 +228,6 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
}
|
||||
)
|
||||
|
||||
syncActivityViewWithController()
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
// Reset Incognito Mode on relaunch
|
||||
preferences.incognitoMode().set(false)
|
||||
@ -339,6 +337,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
checkForUpdates()
|
||||
syncActivityViewWithController()
|
||||
}
|
||||
|
||||
private fun checkForUpdates() {
|
||||
|
@ -89,7 +89,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
*
|
||||
* @param animate True if slide up should be animated
|
||||
*/
|
||||
fun slideUp(animate: Boolean = true) {
|
||||
fun slideUp(animate: Boolean = true) = post {
|
||||
currentAnimator?.cancel()
|
||||
clearAnimation()
|
||||
|
||||
@ -106,7 +106,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
*
|
||||
* @param animate True if slide down should be animated
|
||||
*/
|
||||
fun slideDown(animate: Boolean = true) {
|
||||
fun slideDown(animate: Boolean = true) = post {
|
||||
currentAnimator?.cancel()
|
||||
clearAnimation()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user