Merge branch 'strings-squashed' of https://github.com/oxen-io/session-android into strings-squashed

This commit is contained in:
ThomasSession 2024-08-29 15:21:44 +10:00
commit 5773f05a5c
4 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,7 @@ class DeleteMediaDialog {
@JvmStatic
fun show(context: Context, recordCount: Int, doDelete: Runnable) = context.showSessionDialog {
iconAttribute(R.attr.dialog_alert_icon)
title(context.resources.getQuantityString(R.plurals.deleteMessage, recordCount))
title(context.resources.getQuantityString(R.plurals.deleteMessage, recordCount, recordCount))
text(context.resources.getString(R.string.deleteMessageDescriptionEveryone))
button(R.string.delete) { doDelete.run() }
cancelButton()

View File

@ -9,8 +9,7 @@ class DeleteMediaPreviewDialog {
fun show(context: Context, doDelete: Runnable) {
context.showSessionDialog {
iconAttribute(R.attr.dialog_alert_icon)
title(context.resources.getQuantityString(R.plurals.deleteMessage, 1))
title(context.resources.getQuantityString(R.plurals.deleteMessage, 1, 1))
text(R.string.deleteMessageDescriptionEveryone)
dangerButton(R.string.delete) { doDelete.run() }
cancelButton()

View File

@ -2060,7 +2060,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
private fun showDeleteLocallyUI(messages: Set<MessageRecord>) {
showSessionDialog {
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count()))
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count(), messages.count()))
text(resources.getString(R.string.deleteMessagesDescriptionDevice))
button(R.string.delete) { messages.forEach(viewModel::deleteLocally); endActionMode() }
cancelButton(::endActionMode)
@ -2082,7 +2082,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
// If the recipient is a community OR a Note-to-Self then we delete the message for everyone
if (recipient.isCommunityRecipient || recipient.isLocalNumber) {
showSessionDialog {
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count()))
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count(), messages.count()))
text(resources.getString(R.string.deleteMessageDescriptionEveryone))
button(R.string.delete) { messages.forEach(viewModel::deleteForEveryone); endActionMode() }
cancelButton { endActionMode() }
@ -2110,7 +2110,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
else // Finally, if this is a closed group and you are deleting someone else's message(s) then we can only delete locally.
{
showSessionDialog {
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count()))
title(resources.getQuantityString(R.plurals.deleteMessage, messages.count(), messages.count()))
text(resources.getString(R.string.deleteMessageDescriptionDevice))
dangerButton(R.string.delete) { messages.forEach(viewModel::deleteLocally); endActionMode() }
cancelButton(::endActionMode)

View File

@ -21,7 +21,7 @@ class DeletedMessageView : LinearLayout {
// region Updating
fun bind(message: MessageRecord, @ColorInt textColor: Int) {
assert(message.isDeleted)
binding.deleteTitleTextView.text = context.resources.getQuantityString(R.plurals.deleteMessageDeleted, 1)
binding.deleteTitleTextView.text = context.resources.getQuantityString(R.plurals.deleteMessageDeleted, 1, 1)
binding.deleteTitleTextView.setTextColor(textColor)
binding.deletedMessageViewIconImageView.imageTintList = ColorStateList.valueOf(textColor)
}