2020-02-10 10:32:12 -08:00
|
|
|
package com.geeksville.mesh.ui
|
|
|
|
|
|
|
|
|
|
import androidx.compose.Model
|
2020-02-17 13:34:52 -08:00
|
|
|
import com.geeksville.mesh.R
|
2020-02-10 10:32:12 -08:00
|
|
|
|
2020-02-16 18:54:29 -08:00
|
|
|
|
|
|
|
|
data class ScreenInfo(val icon: Int, val label: String)
|
|
|
|
|
|
2020-02-10 10:32:12 -08:00
|
|
|
// defines the screens we have in the app
|
2020-02-16 18:54:29 -08:00
|
|
|
object Screen {
|
|
|
|
|
val settings = ScreenInfo(R.drawable.ic_twotone_settings_applications_24, "Settings")
|
|
|
|
|
val channel = ScreenInfo(R.drawable.ic_twotone_contactless_24, "Channel")
|
|
|
|
|
val users = ScreenInfo(R.drawable.ic_twotone_people_24, "Users")
|
|
|
|
|
val messages = ScreenInfo(R.drawable.ic_twotone_message_24, "Messages")
|
2020-02-10 10:32:12 -08:00
|
|
|
}
|
|
|
|
|
|
2020-02-16 18:54:29 -08:00
|
|
|
|
2020-02-10 10:32:12 -08:00
|
|
|
@Model
|
|
|
|
|
object AppStatus {
|
2020-02-16 18:54:29 -08:00
|
|
|
var currentScreen: ScreenInfo = Screen.messages
|
2020-02-10 10:32:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Temporary solution pending navigation support.
|
|
|
|
|
*/
|
2020-02-16 18:54:29 -08:00
|
|
|
fun navigateTo(destination: ScreenInfo) {
|
2020-02-10 10:32:12 -08:00
|
|
|
AppStatus.currentScreen = destination
|
|
|
|
|
}
|