@@ -95,26 +95,16 @@ fun CustomListLocations(
95
95
}
96
96
}
97
97
98
- val snackbarHostState = remember { SnackbarHostState () }
99
- val context: Context = LocalContext .current
100
98
LaunchedEffectCollect (customListsViewModel.uiSideEffect) { sideEffect ->
101
99
when (sideEffect) {
102
100
is CustomListLocationsSideEffect .ReturnWithResultData ->
103
101
backNavigator.navigateBack(result = sideEffect.result)
104
- CustomListLocationsSideEffect .Error ->
105
- launch {
106
- snackbarHostState.showSnackbarImmediately(
107
- message = context.getString(R .string.error_occurred),
108
- duration = SnackbarDuration .Short
109
- )
110
- }
111
102
}
112
103
}
113
104
114
105
val state by customListsViewModel.uiState.collectAsStateWithLifecycle()
115
106
CustomListLocationsScreen (
116
107
state = state,
117
- snackbarHostState = snackbarHostState,
118
108
onSearchTermInput = customListsViewModel::onSearchTermInput,
119
109
onSaveClick = customListsViewModel::save,
120
110
onRelaySelectionClick = customListsViewModel::onRelaySelectionClick,
@@ -133,15 +123,13 @@ fun CustomListLocations(
133
123
@Composable
134
124
fun CustomListLocationsScreen (
135
125
state : CustomListLocationsUiState ,
136
- snackbarHostState : SnackbarHostState = SnackbarHostState (),
137
126
onSearchTermInput : (String ) -> Unit = {},
138
127
onSaveClick : () -> Unit = {},
139
128
onRelaySelectionClick : (RelayItem .Location , selected: Boolean ) -> Unit = { _, _ -> },
140
129
onExpand : (RelayItem .Location , selected: Boolean ) -> Unit = { _, _ -> },
141
130
onBackClick : () -> Unit = {}
142
131
) {
143
132
ScaffoldWithSmallTopBar (
144
- snackbarHostState = snackbarHostState,
145
133
appBarTitle =
146
134
stringResource(
147
135
if (state.newList) {
0 commit comments