Update MainActivity.kt

This commit is contained in:
Jay 2020-02-07 03:28:19 -08:00
parent 887c5fefae
commit b7111e7ac6

View File

@ -86,8 +86,10 @@ open class MainActivity : BaseActivity() {
canDismissSnackBar = false canDismissSnackBar = false
launchUI { launchUI {
delay(5000) delay(5000)
if (this@MainActivity.snackBar == snackBar) {
canDismissSnackBar = true canDismissSnackBar = true
} }
}
extraViewForUndo = extraViewToCheck extraViewForUndo = extraViewToCheck
} }
@ -466,7 +468,11 @@ open class MainActivity : BaseActivity() {
} }
} }
if (to is SecondaryDrawerController) { if (to is SecondaryDrawerController) {
secondaryDrawer = to.createSecondaryDrawer(drawer)?.also { drawer.addView(it) } val newDrawer = to.createSecondaryDrawer(drawer)?.also { drawer.addView(it) }
secondaryDrawer = if (newDrawer == null && secondaryDrawer != null) {
drawer.removeView(secondaryDrawer)
null
} else newDrawer
} }
if (to is NoToolbarElevationController) { if (to is NoToolbarElevationController) {