File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,11 @@ fun UploadScreen(
5959 }
6060 )
6161
62- @Composable
63- fun exit () {
64- if (hasPickedFiles) LaunchedEffect (navigateBackToPickFiles) { navigateBackToPickFiles() }
65- else LaunchedEffect (exitNewTransfer) { exitNewTransfer() }
66- }
67-
6862 when (val state = uploadState) {
6963 null -> {
70- exit()
64+ // Extracting the if/else below to a local composable function causes flickering, so leave it here.
65+ if (hasPickedFiles) LaunchedEffect (navigateBackToPickFiles) { navigateBackToPickFiles() }
66+ else LaunchedEffect (exitNewTransfer) { exitNewTransfer() }
7167 NoUploadOngoingEmptyState ()
7268 }
7369 is UploadState .Ongoing -> UploadOngoingScreen (
You can’t perform that action at this time.
0 commit comments