mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 20:43:39 +00:00
SES-2386 Account Creation Modal
This commit is contained in:
parent
4a2f6e7b4e
commit
95ecbe664d
@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms.onboarding
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import network.loki.messenger.R
|
||||
@ -11,12 +12,13 @@ import org.thoughtcrime.securesms.ui.color.LocalColors
|
||||
@Composable
|
||||
fun OnboardingBackPressAlertDialog(
|
||||
dismissDialog: () -> Unit,
|
||||
@StringRes textId: Int = R.string.you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit,
|
||||
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),
|
||||
text = stringResource(textId),
|
||||
buttons = listOf(
|
||||
DialogButtonModel(
|
||||
GetString(stringResource(R.string.quit)),
|
||||
|
@ -58,7 +58,7 @@ internal fun MessageNotificationsScreen(
|
||||
return
|
||||
}
|
||||
|
||||
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit)
|
||||
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit = quit)
|
||||
|
||||
Column {
|
||||
Spacer(Modifier.weight(1f))
|
||||
|
@ -40,7 +40,11 @@ internal fun PickDisplayName(
|
||||
quit: () -> Unit = {}
|
||||
) {
|
||||
|
||||
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit)
|
||||
if (state.showDialog) OnboardingBackPressAlertDialog(
|
||||
dismissDialog,
|
||||
R.string.you_cannot_go_back_further_cancel_account_creation,
|
||||
quit
|
||||
)
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
@ -1140,5 +1140,6 @@
|
||||
<string name="AccessibilityId_qr_code">QR code</string>
|
||||
<string name="warning">Warning</string>
|
||||
<string name="you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit">You cannot go back further. In order to stop loading your account, Session needs to quit.</string>
|
||||
<string name="you_cannot_go_back_further_cancel_account_creation">You cannot go back further. In order to cancel your account creation, Session needs to quit.</string>
|
||||
<string name="quit">Quit</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user