mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 10:35:19 +00:00
Subtituted 'Session' into 'Quit Session' text on go-back modal
This commit is contained in:
parent
67bcc937ce
commit
786485d874
@ -6,10 +6,12 @@ import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.squareup.phrase.Phrase
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.utilities.NonTranslatableStringConstants.APP_NAME
|
||||
import org.session.libsession.utilities.StringSubstitutionConstants.APP_NAME_KEY
|
||||
import org.thoughtcrime.securesms.ui.AlertDialog
|
||||
import org.thoughtcrime.securesms.ui.DialogButtonModel
|
||||
import org.thoughtcrime.securesms.ui.GetString
|
||||
import org.thoughtcrime.securesms.ui.getSubbedString
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalColors
|
||||
|
||||
@Composable
|
||||
@ -18,16 +20,18 @@ fun OnboardingBackPressAlertDialog(
|
||||
@StringRes textId: Int = R.string.onboardingBackAccountCreation,
|
||||
quit: () -> Unit
|
||||
) {
|
||||
val c = LocalContext.current
|
||||
val quitButtonText = c.getSubbedString(R.string.quit, APP_NAME_KEY to APP_NAME)
|
||||
|
||||
AlertDialog(
|
||||
onDismissRequest = dismissDialog,
|
||||
title = stringResource(R.string.warning),
|
||||
text = stringResource(textId).let { txt ->
|
||||
val c = LocalContext.current
|
||||
Phrase.from(txt).put(APP_NAME_KEY, c.getString(R.string.app_name)).format().toString()
|
||||
},
|
||||
buttons = listOf(
|
||||
DialogButtonModel(
|
||||
GetString(stringResource(R.string.quit)),
|
||||
text = GetString(quitButtonText),
|
||||
color = LocalColors.current.danger,
|
||||
onClick = quit
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user