diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 45e0424d24..a12546af29 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -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 diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/BlockedDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/BlockedDialog.kt index edb1067e6c..394e41bab7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/BlockedDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/BlockedDialog.kt @@ -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() } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt index c70f78fed2..1c550eb5eb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt @@ -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) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt index 8ad223e897..93f79d2b16 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt @@ -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) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/BlockedContactsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/BlockedContactsActivity.kt index 41aa5d5a57..e49f3fb85e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/BlockedContactsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/BlockedContactsActivity.kt @@ -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()