SES-2713 - band dialog strings

Also tweaking xml dialog's margin so they look like Compose's material dialogs
This commit is contained in:
ThomasSession 2024-09-11 14:24:02 +10:00
parent 0fd801accb
commit 4cb9372d0f
4 changed files with 12 additions and 5 deletions

View File

@ -2122,16 +2122,16 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
showSessionDialog {
title(R.string.banUser)
text(R.string.communityBanDescription)
button(R.string.banUser) { viewModel.banUser(messages.first().individualRecipient); endActionMode() }
dangerButton(R.string.theContinue) { viewModel.banUser(messages.first().individualRecipient); endActionMode() }
cancelButton(::endActionMode)
}
}
override fun banAndDeleteAll(messages: Set<MessageRecord>) {
showSessionDialog {
title(R.string.banUser)
title(R.string.banDeleteAll)
text(R.string.communityBanDeleteDescription)
button(R.string.banUser) { viewModel.banAndDeleteAll(messages.first()); endActionMode() }
dangerButton(R.string.theContinue) { viewModel.banAndDeleteAll(messages.first()); endActionMode() }
cancelButton(::endActionMode)
}
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<inset
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/default_dialog_background"
android:insetRight="24dp"
android:insetLeft="24dp"> <!-- Using Material's inset size -->
</inset>

View File

@ -30,7 +30,7 @@
<dimen name="text_view_corner_radius">8dp</dimen>
<dimen name="fake_chat_view_bubble_corner_radius">10dp</dimen>
<dimen name="setting_button_height">64dp</dimen>
<dimen name="dialog_corner_radius">8dp</dimen>
<dimen name="dialog_corner_radius">12dp</dimen>
<dimen name="video_inset_radius">11dp</dimen>
<dimen name="pn_option_corner_radius">8dp</dimen>
<dimen name="path_status_view_size">8dp</dimen>

View File

@ -33,7 +33,7 @@
</style>
<style name="ThemeOverlay.Session.AlertDialog" parent="ThemeOverlay.AppCompat.Dialog.Alert">
<item name="android:windowBackground">@drawable/default_dialog_background</item>
<item name="android:windowBackground">@drawable/default_dialog_background_inset</item>
<item name="android:colorBackground">?backgroundSecondary</item>
<item name="android:colorBackgroundFloating">?colorPrimary</item>
<item name="backgroundTint">?colorPrimary</item>