added description

This commit is contained in:
Avently
2023-01-26 23:14:33 +03:00
parent 15ed6ea4a6
commit 3b3db562cd
3 changed files with 13 additions and 2 deletions

View File

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

View File

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

View File

@@ -979,6 +979,7 @@
<string name="users_add">Add profile</string>
<string name="users_delete_question">Delete chat profile?</string>
<string name="users_delete_all_chats_deleted">All chats and messages will be deleted - this cannot be undone!</string>
<string name="users_delete_profile_for">Delete chat profile for</string>
<string name="users_delete_with_connections">Profile and server connections</string>
<string name="users_delete_data_only">Local profile data only</string>