Start new Home rows leftmost and gate outgoing Back handlers
This commit is contained in:
parent
5811ab0555
commit
c5dbe91076
7 changed files with 82 additions and 32 deletions
|
|
@ -16,6 +16,7 @@ import androidx.compose.ui.input.key.type
|
|||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import org.justinvisser.wolfskin.design.DiscoverOverlay
|
||||
import org.justinvisser.wolfskin.design.ShellKey
|
||||
import org.justinvisser.wolfskin.design.isScreenEntryActive
|
||||
import org.justinvisser.wolfskin.design.readShellKey
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
|
@ -339,7 +340,7 @@ fun TitleDestination(route: String, shell: ShellState, preferences: UserPreferen
|
|||
if (title?.data?.status == TitleReadStatus.Ready) shell.navFocused = false
|
||||
}
|
||||
val person = viewModel.person.takeIf { title != null }
|
||||
BackHandler(enabled = title != null) {
|
||||
BackHandler(enabled = isScreenEntryActive() && title != null) {
|
||||
if (requests?.overlay != null) requests.key(ShellKey.Back) else title?.back(shell)
|
||||
}
|
||||
Box(modifier.onPreviewKeyEvent { event ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue