Skip to content

Commit

Permalink
Prevent back navigation on permission screen to not create accounts t…
Browse files Browse the repository at this point in the history
…wice
  • Loading branch information
wmontwe committed Jan 11, 2024
1 parent e81bea1 commit 95b596f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app.k9mail.feature.onboarding.permissions.ui

import android.Manifest
import android.os.Build
import androidx.activity.compose.BackHandler
import androidx.activity.compose.ManagedActivityResultLauncher
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts.RequestPermission
Expand Down Expand Up @@ -37,6 +38,10 @@ fun PermissionsScreen(
}
}

BackHandler {
// no back navigation
}

LaunchedEffect(key1 = Unit) {
dispatch(Event.LoadPermissionState)
}
Expand Down

0 comments on commit 95b596f

Please sign in to comment.