kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
don't use Crossfade because it kinda breaks onCommit
rodzic
fd17dcefe1
commit
80597bf48a
|
@ -2,7 +2,6 @@ package com.geeksville.mesh.ui
|
|||
|
||||
import androidx.compose.Composable
|
||||
import androidx.compose.state
|
||||
import androidx.ui.animation.Crossfade
|
||||
import androidx.ui.core.ContextAmbient
|
||||
import androidx.ui.core.Text
|
||||
import androidx.ui.layout.Column
|
||||
|
@ -124,7 +123,8 @@ fun previewView() {
|
|||
|
||||
@Composable
|
||||
private fun AppContent(openDrawer: () -> Unit) {
|
||||
Crossfade(AppStatus.currentScreen) { screen ->
|
||||
// crossfade breaks onCommit behavior because it keeps old views around
|
||||
//Crossfade(AppStatus.currentScreen) { screen ->
|
||||
Surface(color = (MaterialTheme.colors()).background) {
|
||||
|
||||
Column {
|
||||
|
@ -139,7 +139,7 @@ private fun AppContent(openDrawer: () -> Unit) {
|
|||
}
|
||||
)
|
||||
|
||||
when (screen) {
|
||||
when (AppStatus.currentScreen) {
|
||||
Screen.messages -> MessagesContent()
|
||||
Screen.settings -> SettingsContent()
|
||||
Screen.users -> HomeContent()
|
||||
|
@ -148,5 +148,5 @@ private fun AppContent(openDrawer: () -> Unit) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue