Skip to content

Commit

Permalink
Fix detekt warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Nov 25, 2024
1 parent 20d82b0 commit 6c3d27a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ fun Connect(
minActiveState = Lifecycle.State.RESUMED,
) { sideEffect ->
when (sideEffect) {
is ConnectViewModel.UiSideEffect.OpenAccountManagementPageInBrowser -> {
is ConnectViewModel.UiSideEffect.OpenAccountManagementPageInBrowser ->
openAccountPage(sideEffect.token)
}

is ConnectViewModel.UiSideEffect.OutOfTime ->
navigator.navigate(OutOfTimeDestination) {
Expand All @@ -172,7 +171,8 @@ fun Connect(

is ConnectViewModel.UiSideEffect.NotPrepared ->
when (sideEffect.prepareError) {
is PrepareError.OtherLegacyAlwaysOnVpn -> launch {
is PrepareError.OtherLegacyAlwaysOnVpn ->
launch {
snackbarHostState.showSnackbarImmediately(
message = sideEffect.prepareError.toMessage(context)
)
Expand All @@ -194,13 +194,12 @@ fun Connect(
)
}

is ConnectViewModel.UiSideEffect.OpenUri -> {
is ConnectViewModel.UiSideEffect.OpenUri ->
try {
uriHandler.openUri(sideEffect.uri.toString())
} catch (e: IllegalArgumentException) {
Logger.w("Failed to open uri", e)
}
}
}
}

Expand Down

0 comments on commit 6c3d27a

Please sign in to comment.