mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-19 07:24:22 +01:00
Handled back gesture
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package no.nordicsemi.android.toolbox.profile
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
@@ -62,6 +63,10 @@ internal fun ProfileScreen() {
|
||||
val onClickEvent: (ConnectionEvent) -> Unit = { event ->
|
||||
profileViewModel.onConnectionEvent(event)
|
||||
}
|
||||
// Handle back press to navigate up.
|
||||
BackHandler {
|
||||
onClickEvent(ConnectionEvent.NavigateUp)
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
contentWindowInsets = WindowInsets.displayCutout
|
||||
|
||||
Reference in New Issue
Block a user