Adjusted SS-64 so that all Block / Unblock buttons now use that text and are displayed in red

This commit is contained in:
alansley 2024-08-21 13:53:58 +10:00
parent 2192c2c007
commit 69f6818f99
5 changed files with 8 additions and 9 deletions

View File

@ -1242,10 +1242,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
.put(NAME_KEY, recipient.name)
.format()
)
dangerButton(
R.string.blockUnblock,
R.string.AccessibilityId_unblockConfirm
) {
dangerButton(R.string.blockUnblock, R.string.AccessibilityId_unblockConfirm) {
viewModel.unblock()
// Unblock confirmation toast added as per SS-64

View File

@ -33,7 +33,7 @@ class BlockedDialog(private val recipient: Recipient, private val context: Conte
title(resources.getString(R.string.blockUnblock))
text(spannable)
button(R.string.blockUnblock) { unblock() }
dangerButton(R.string.blockUnblock,R.string.AccessibilityId_unblockConfirm) { unblock() }
cancelButton { dismiss() }
}

View File

@ -617,7 +617,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
text(Phrase.from(context, R.string.blockDescription)
.put(NAME_KEY, thread.recipient.name)
.format())
button(R.string.block) {
dangerButton(R.string.block, R.string.AccessibilityId_blockConfirm) {
lifecycleScope.launch(Dispatchers.IO) {
storage.setBlocked(listOf(thread.recipient), true)
@ -637,7 +637,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
showSessionDialog {
title(R.string.blockUnblock)
text(Phrase.from(context, R.string.blockUnblockName).put(NAME_KEY, thread.recipient.name).format())
button(R.string.blockUnblock) {
dangerButton(R.string.blockUnblock, R.string.AccessibilityId_unblockConfirm) {
lifecycleScope.launch(Dispatchers.IO) {
storage.setBlocked(listOf(thread.recipient), false)
withContext(Dispatchers.Main) {

View File

@ -89,7 +89,9 @@ class MessageRequestsActivity : PassphraseRequiredActionBarActivity(), Conversat
text(Phrase.from(context, R.string.blockDescription)
.put(NAME_KEY, thread.recipient.name)
.format())
button(R.string.block) { doBlock() }
dangerButton(R.string.block, R.string.AccessibilityId_blockConfirm) {
doBlock()
}
button(R.string.no)
}
}

View File

@ -70,7 +70,7 @@ class BlockedContactsActivity: PassphraseRequiredActionBarActivity() {
}
text(txt)
button(R.string.theContinue) {
dangerButton(R.string.blockUnblock, R.string.AccessibilityId_unblockConfirm) {
// Show individual toasts for each unblocked user (we don't have suitable strings to do it as a single toast)
val contactsToUnblockNames = contactsToUnblock.map { it.name }
val toastStrings = mutableListOf<String>()