From 3b3db562cd21c45157fc95a3c570ce789eb11a3b Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Thu, 26 Jan 2023 23:14:33 +0300 Subject: [PATCH] added description --- .../chat/simplex/app/views/helpers/AlertManager.kt | 3 ++- .../app/views/usersettings/UserProfilesView.kt | 11 ++++++++++- apps/android/app/src/main/res/values/strings.xml | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/helpers/AlertManager.kt b/apps/android/app/src/main/java/chat/simplex/app/views/helpers/AlertManager.kt index 71d98d139..03cabe4c8 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/helpers/AlertManager.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/helpers/AlertManager.kt @@ -8,6 +8,7 @@ import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.* import androidx.compose.ui.window.Dialog @@ -45,7 +46,7 @@ class AlertManager { fun showAlertDialogButtonsColumn( title: String, - text: String? = null, + text: AnnotatedString? = null, buttons: @Composable () -> Unit, ) { showAlert { diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/UserProfilesView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/UserProfilesView.kt index 9f1422add..68026b395 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/UserProfilesView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/UserProfilesView.kt @@ -13,6 +13,8 @@ import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.* +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import chat.simplex.app.R import chat.simplex.app.model.* @@ -38,9 +40,16 @@ fun UserProfilesView(m: ChatModel) { } }, removeUser = { user -> + val text = buildAnnotatedString { + append(generalGetString(R.string.users_delete_all_chats_deleted) + "\n\n" + generalGetString(R.string.users_delete_profile_for) + " ") + withStyle(SpanStyle(fontWeight = FontWeight.Bold)) { + append(user.chatViewName) + } + append(":") + } AlertManager.shared.showAlertDialogButtonsColumn( title = generalGetString(R.string.users_delete_question), - text = generalGetString(R.string.users_delete_all_chats_deleted), + text = text, buttons = { Column { SectionItemView({ diff --git a/apps/android/app/src/main/res/values/strings.xml b/apps/android/app/src/main/res/values/strings.xml index 5e66033aa..47a3aca42 100644 --- a/apps/android/app/src/main/res/values/strings.xml +++ b/apps/android/app/src/main/res/values/strings.xml @@ -979,6 +979,7 @@ Add profile Delete chat profile? All chats and messages will be deleted - this cannot be undone! + Delete chat profile for Profile and server connections Local profile data only