Skip to content

Commit

Permalink
- Fixes #35: Add button to go to login screen after login error
Browse files Browse the repository at this point in the history
  • Loading branch information
DesarrolloAntonio committed Jun 12, 2024
1 parent 964b9bb commit d7bf10d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ fun BookmarkEditorScreen(
icon = Icons.Default.Error,
title = "Error",
content = bookmarkUiState.error,
dismissButton = if (bookmarkViewModel.sessionExpired) "Go to login" else "",
confirmButton = "Accept" ,
openDialog = remember { mutableStateOf(true) },
onConfirm = {
onDismiss = {
if (bookmarkViewModel.sessionExpired){
startMainActivity()
}
}
},
onConfirm = {}
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ fun ConfirmDialog(
dismissButton: String = "",
icon: ImageVector? = null,
onConfirm: (() -> Unit)? = null,
onDismiss: (() -> Unit)? = null,
openDialog: MutableState<Boolean>,
properties: DialogProperties = DialogProperties(),
) {
Expand All @@ -114,6 +115,7 @@ fun ConfirmDialog(
content = content,
icon = icon,
onConfirm = onConfirm,
onDismiss = onDismiss,
confirmButtonText = confirmButton,
dismissButtonText = dismissButton,
openDialog = openDialog,
Expand Down

0 comments on commit d7bf10d

Please sign in to comment.