mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Provide Navigation to Input Timezone (#2003)
This commit is contained in:
parent
43b6e54bbb
commit
e4313e0bd3
7 changed files with 153 additions and 56 deletions
|
|
@ -32,7 +32,6 @@ import androidx.navigation.toRoute
|
|||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.model.UIViewModel
|
||||
import com.geeksville.mesh.ui.TopLevelDestination.Companion.isTopLevel
|
||||
import com.geeksville.mesh.ui.connections.ConnectionsScreen
|
||||
import com.geeksville.mesh.ui.contact.ContactsScreen
|
||||
import com.geeksville.mesh.ui.debug.DebugScreen
|
||||
import com.geeksville.mesh.ui.map.MapView
|
||||
|
|
@ -53,9 +52,6 @@ const val DEEP_LINK_BASE_URI = "meshtastic://meshtastic"
|
|||
|
||||
@Serializable
|
||||
sealed interface Graph : Route {
|
||||
@Serializable
|
||||
data class ChannelsGraph(val destNum: Int?)
|
||||
|
||||
@Serializable
|
||||
data class NodeDetailGraph(val destNum: Int) : Graph
|
||||
|
||||
|
|
@ -74,12 +70,6 @@ sealed interface Route {
|
|||
@Serializable
|
||||
data object Map : Route
|
||||
|
||||
@Serializable
|
||||
data object Channels : Route
|
||||
|
||||
@Serializable
|
||||
data object Connections : Route
|
||||
|
||||
@Serializable
|
||||
data object DebugPanel : Route
|
||||
|
||||
|
|
@ -221,7 +211,7 @@ fun NavGraph(
|
|||
NavHost(
|
||||
navController = navController,
|
||||
startDestination = if (uIViewModel.bondedAddress.isNullOrBlank()) {
|
||||
Route.Connections
|
||||
ConnectionsRoutes.ConnectionsGraph
|
||||
} else {
|
||||
Route.Contacts
|
||||
},
|
||||
|
|
@ -246,26 +236,8 @@ fun NavGraph(
|
|||
|
||||
channelsGraph(navController, uIViewModel)
|
||||
|
||||
composable<Route.Connections>(
|
||||
deepLinks = listOf(
|
||||
navDeepLink {
|
||||
uriPattern = "$DEEP_LINK_BASE_URI/connections"
|
||||
action = "android.intent.action.VIEW"
|
||||
}
|
||||
)
|
||||
) { backStackEntry ->
|
||||
ConnectionsScreen(
|
||||
uIViewModel,
|
||||
onNavigateToRadioConfig = {
|
||||
navController.navigate(Route.RadioConfig()) {
|
||||
popUpTo(Route.Connections) {
|
||||
inclusive = false
|
||||
}
|
||||
}
|
||||
},
|
||||
onNavigateToNodeDetails = { navController.navigate(Route.NodeDetail(it)) }
|
||||
)
|
||||
}
|
||||
connectionsGraph(navController, uIViewModel)
|
||||
|
||||
composable<Route.DebugPanel> {
|
||||
DebugScreen()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue