SES-2386 Account Creation Modal

This commit is contained in:
bemusementpark 2024-07-11 11:26:41 +09:30
parent 4a2f6e7b4e
commit 95ecbe664d
4 changed files with 10 additions and 3 deletions

View File

@ -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)),

View File

@ -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))

View File

@ -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

View File

@ -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>