Cleaning up modals for platform consistency

This commit is contained in:
ThomasSession 2024-09-16 09:29:19 +10:00
parent cc63fa3eca
commit 0d158b62e4
2 changed files with 17 additions and 7 deletions

View File

@ -949,12 +949,21 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
block(deleteThread = true) block(deleteThread = true)
} }
binding.declineMessageRequestButton.setOnClickListener { binding.declineMessageRequestButton.setOnClickListener {
fun doDecline() {
viewModel.declineMessageRequest() viewModel.declineMessageRequest()
lifecycleScope.launch(Dispatchers.IO) { lifecycleScope.launch(Dispatchers.IO) {
ConfigurationMessageUtilities.forceSyncConfigurationNowIfNeeded(this@ConversationActivityV2) ConfigurationMessageUtilities.forceSyncConfigurationNowIfNeeded(this@ConversationActivityV2)
} }
finish() finish()
} }
showSessionDialog {
title(R.string.delete)
text(resources.getString(R.string.messageRequestsDelete))
dangerButton(R.string.delete) { doDecline() }
button(R.string.cancel)
}
}
} }
private fun acceptMessageRequest() { private fun acceptMessageRequest() {

View File

@ -108,7 +108,7 @@ class MessageRequestsActivity : PassphraseRequiredActionBarActivity(), Conversat
showSessionDialog { showSessionDialog {
title(R.string.delete) title(R.string.delete)
text(resources.getString(R.string.messageRequestsDelete)) text(resources.getString(R.string.messageRequestsDelete))
button(R.string.delete) { doDecline() } dangerButton(R.string.delete) { doDecline() }
button(R.string.cancel) button(R.string.cancel)
} }
} }
@ -129,9 +129,10 @@ class MessageRequestsActivity : PassphraseRequiredActionBarActivity(), Conversat
} }
showSessionDialog { showSessionDialog {
title(resources.getString(R.string.clearAll))
text(resources.getString(R.string.messageRequestsClearAllExplanation)) text(resources.getString(R.string.messageRequestsClearAllExplanation))
button(R.string.yes) { doDeleteAllAndBlock() } dangerButton(R.string.clear) { doDeleteAllAndBlock() }
button(R.string.no) button(R.string.cancel)
} }
} }
} }