mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Adjusted SS-64 so that all Block / Unblock buttons now use that text and are displayed in red
This commit is contained in:
parent
2192c2c007
commit
69f6818f99
@ -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
|
||||
|
@ -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() }
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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>()
|
||||
|
Loading…
Reference in New Issue
Block a user