Fix crash when clicking fast on back key on the Developer settings screen.
This commit is contained in:
parent
7bf7f68706
commit
83d13d0eb5
2 changed files with 6 additions and 1 deletions
|
|
@ -186,6 +186,10 @@ class PreferencesFlowNode(
|
|||
override fun navigateToPushHistory() {
|
||||
backstack.push(NavTarget.PushHistory)
|
||||
}
|
||||
|
||||
override fun onDone() {
|
||||
backstack.pop()
|
||||
}
|
||||
}
|
||||
createNode<DeveloperSettingsNode>(buildContext, listOf(developerSettingsCallback))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class DeveloperSettingsNode(
|
|||
) : Node(buildContext, plugins = plugins) {
|
||||
interface Callback : Plugin {
|
||||
fun navigateToPushHistory()
|
||||
fun onDone()
|
||||
}
|
||||
|
||||
private val callback: Callback = callback()
|
||||
|
|
@ -49,7 +50,7 @@ class DeveloperSettingsNode(
|
|||
modifier = modifier,
|
||||
onOpenShowkase = ::openShowkase,
|
||||
onPushHistoryClick = callback::navigateToPushHistory,
|
||||
onBackClick = ::navigateUp
|
||||
onBackClick = callback::onDone,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue