fix(app-phone): аппаратный back — детали → каталог, инфо об очках → пульт
BackHandler в ViewMateApp (DETAILS → CATALOG, GLASSES_INFO → GLASSES); раньше системная кнопка сворачивала приложение. Проверено на железе.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package pw.binom.viewmate.phone.ui
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -29,6 +30,9 @@ fun ViewMateApp() {
|
||||
var selected by remember { mutableStateOf<JellyfinItem?>(null) }
|
||||
|
||||
PhoneTheme {
|
||||
BackHandler(enabled = screen == Screen.DETAILS || screen == Screen.GLASSES_INFO) {
|
||||
screen = if (screen == Screen.GLASSES_INFO) Screen.GLASSES else Screen.CATALOG
|
||||
}
|
||||
Scaffold(
|
||||
containerColor = PhoneBackground,
|
||||
bottomBar = {
|
||||
|
||||
Reference in New Issue
Block a user