Skip to content

Commit

Permalink
Adjusted SS-64 so that all Block / Unblock buttons now use that text …
Browse files Browse the repository at this point in the history
…and are displayed in red
  • Loading branch information
alansley committed Aug 21, 2024
1 parent 2192c2c commit 69f6818
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>()
Expand Down

0 comments on commit 69f6818

Please sign in to comment.