Update AppNavGraph.kt
This commit is contained in:
parent
46ef4521cc
commit
af9a5487b1
@ -86,8 +86,14 @@ fun AppNavGraph(
|
||||
val transProcessViewModel: TransProcessViewModel = hiltViewModel(activity)
|
||||
val dashboardViewModel: DashboardViewModel = hiltViewModel(activity)
|
||||
val dashboardUiState = dashboardViewModel.uiState.collectAsStateWithLifecycle().value
|
||||
val deviceInfoViewModel: DeviceInfoViewModel = hiltViewModel(activity)
|
||||
val deviceInfoUiState = deviceInfoViewModel.uiState.collectAsStateWithLifecycle().value
|
||||
val tmsSetupViewModel: TmsSetupViewModel = hiltViewModel();
|
||||
|
||||
LaunchedEffect(deviceInfoViewModel) {
|
||||
deviceInfoViewModel.loadDeviceInfo()
|
||||
}
|
||||
|
||||
LaunchedEffect(tmsSetupViewModel) {
|
||||
tmsSetupViewModel.onSyncCompleted.collect {
|
||||
dashboardViewModel.refreshLastSyncTime()
|
||||
@ -97,6 +103,7 @@ fun AppNavGraph(
|
||||
transProcessViewModel.resetTransactionStatus()
|
||||
DashboardScreen2(
|
||||
dashboardUiState = dashboardUiState,
|
||||
deviceInfo = deviceInfoUiState,
|
||||
onClickLastSync = {
|
||||
tmsSetupViewModel.downloadConfigs()
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user