mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Actually fixed dialog causing visual glitch
Note to self, don't continue programming when you start feeling sleep
This commit is contained in:
parent
11d4511bc8
commit
27dbedfcd6
3 changed files with 3 additions and 8 deletions
|
@ -61,7 +61,7 @@ abstract class BaseController(bundle: Bundle? = null) :
|
||||||
open fun onViewCreated(view: View) { }
|
open fun onViewCreated(view: View) { }
|
||||||
|
|
||||||
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
|
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
|
||||||
if (type.isEnter) {
|
if (type.isEnter && !isControllerVisible) {
|
||||||
view?.alpha = 0f
|
view?.alpha = 0f
|
||||||
} else {
|
} else {
|
||||||
removeQueryListener()
|
removeQueryListener()
|
||||||
|
|
|
@ -99,13 +99,7 @@ abstract class DialogController : Controller {
|
||||||
if (dismissed) {
|
if (dismissed) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val prev = this.previousController
|
|
||||||
router.popController(this)
|
router.popController(this)
|
||||||
// FIXME: This is a hack so that previous controller stays visible
|
|
||||||
prev?.let {
|
|
||||||
if (it !is BaseController) return@let
|
|
||||||
it.view?.alpha = 1.0f
|
|
||||||
}
|
|
||||||
dismissed = true
|
dismissed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.databinding.MainActivityBinding
|
import eu.kanade.tachiyomi.databinding.MainActivityBinding
|
||||||
import eu.kanade.tachiyomi.ui.base.SmallToolbarInterface
|
import eu.kanade.tachiyomi.ui.base.SmallToolbarInterface
|
||||||
|
import eu.kanade.tachiyomi.ui.base.controller.BaseController
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.BaseLegacyController
|
import eu.kanade.tachiyomi.ui.base.controller.BaseLegacyController
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.CrossFadeChangeHandler
|
import eu.kanade.tachiyomi.ui.base.controller.CrossFadeChangeHandler
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||||
|
@ -903,7 +904,7 @@ val Controller.previousController: Controller?
|
||||||
@MainThread
|
@MainThread
|
||||||
fun Router.canStillGoBack(): Boolean {
|
fun Router.canStillGoBack(): Boolean {
|
||||||
if (backstack.size > 1) return true
|
if (backstack.size > 1) return true
|
||||||
(backstack.lastOrNull()?.controller as? BaseLegacyController<*>)?.let { controller ->
|
(backstack.lastOrNull()?.controller as? BaseController)?.let { controller ->
|
||||||
return controller.canStillGoBack()
|
return controller.canStillGoBack()
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue