1
1
package cloud.pablos.overload.ui
2
2
3
+ import android.content.Intent
3
4
import android.os.Build
5
+ import androidx.activity.result.ActivityResultLauncher
4
6
import androidx.annotation.RequiresApi
5
7
import androidx.compose.animation.AnimatedVisibility
6
8
import androidx.compose.foundation.background
@@ -64,6 +66,7 @@ fun OverloadApp(
64
66
displayFeatures : List <DisplayFeature >,
65
67
state : ItemState ,
66
68
onEvent : (ItemEvent ) -> Unit ,
69
+ filePickerLauncher : ActivityResultLauncher <Intent >,
67
70
) {
68
71
val navigationType: OverloadNavigationType
69
72
val contentType: OverloadContentType
@@ -136,6 +139,7 @@ fun OverloadApp(
136
139
navigationContentPosition = navigationContentPosition,
137
140
state = state,
138
141
onEvent = onEvent,
142
+ filePickerLauncher = filePickerLauncher,
139
143
)
140
144
}
141
145
@@ -147,6 +151,7 @@ private fun OverloadNavigationWrapper(
147
151
navigationContentPosition : OverloadNavigationContentPosition ,
148
152
state : ItemState ,
149
153
onEvent : (ItemEvent ) -> Unit ,
154
+ filePickerLauncher : ActivityResultLauncher <Intent >,
150
155
) {
151
156
val drawerState = rememberDrawerState(initialValue = DrawerValue .Closed )
152
157
val scope = rememberCoroutineScope()
@@ -176,6 +181,7 @@ private fun OverloadNavigationWrapper(
176
181
},
177
182
state = state,
178
183
onEvent = onEvent,
184
+ filePickerLauncher = filePickerLauncher,
179
185
)
180
186
}
181
187
@@ -211,6 +217,7 @@ private fun OverloadNavigationWrapper(
211
217
},
212
218
state = state,
213
219
onEvent = onEvent,
220
+ filePickerLauncher = filePickerLauncher,
214
221
)
215
222
}
216
223
}
@@ -230,6 +237,7 @@ fun OverloadAppContent(
230
237
onDrawerClicked : () -> Unit = {},
231
238
state : ItemState ,
232
239
onEvent : (ItemEvent ) -> Unit ,
240
+ filePickerLauncher : ActivityResultLauncher <Intent >,
233
241
) {
234
242
var forgotDialogState by remember { mutableStateOf(false ) }
235
243
LaunchedEffect (state.isForgotToStopDialogShown) {
@@ -269,6 +277,7 @@ fun OverloadAppContent(
269
277
navController = navController,
270
278
state = state,
271
279
onEvent = onEvent,
280
+ filePickerLauncher = filePickerLauncher,
272
281
modifier =
273
282
Modifier
274
283
.weight(1f )
@@ -328,6 +337,7 @@ private fun OverloadNavHost(
328
337
modifier : Modifier = Modifier ,
329
338
state : ItemState ,
330
339
onEvent : (ItemEvent ) -> Unit ,
340
+ filePickerLauncher : ActivityResultLauncher <Intent >,
331
341
) {
332
342
NavHost (
333
343
modifier = modifier,
@@ -359,6 +369,7 @@ private fun OverloadNavHost(
359
369
ConfigurationsTab (
360
370
state = state,
361
371
onEvent = onEvent,
372
+ filePickerLauncher = filePickerLauncher,
362
373
)
363
374
}
364
375
}
0 commit comments