Add dialog to backpress on create account flow
parent
4660905c09
commit
39f9b959ce
@ -0,0 +1,31 @@
|
|||||||
|
package org.thoughtcrime.securesms.onboarding
|
||||||
|
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import network.loki.messenger.R
|
||||||
|
import org.thoughtcrime.securesms.ui.AlertDialog
|
||||||
|
import org.thoughtcrime.securesms.ui.DialogButtonModel
|
||||||
|
import org.thoughtcrime.securesms.ui.GetString
|
||||||
|
import org.thoughtcrime.securesms.ui.color.LocalColors
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun OnboardingBackPressAlertDialog(
|
||||||
|
dismissDialog: () -> Unit,
|
||||||
|
quit: () -> Unit
|
||||||
|
) {
|
||||||
|
AlertDialog(
|
||||||
|
onDismissRequest = dismissDialog,
|
||||||
|
title = stringResource(R.string.warning),
|
||||||
|
text = stringResource(R.string.you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit),
|
||||||
|
buttons = listOf(
|
||||||
|
DialogButtonModel(
|
||||||
|
GetString(stringResource(R.string.quit)),
|
||||||
|
color = LocalColors.current.danger,
|
||||||
|
onClick = quit
|
||||||
|
),
|
||||||
|
DialogButtonModel(
|
||||||
|
GetString(stringResource(R.string.cancel))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue