From 5d7d141d0c712e1486155509301d14aeb71b9802 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 25 Jan 2023 17:19:23 +1100 Subject: [PATCH 1/2] Added a missing parameter to the SMS & MSS projections --- .../java/org/thoughtcrime/securesms/database/MmsDatabase.kt | 1 + .../java/org/thoughtcrime/securesms/database/SmsDatabase.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.kt index 63975d3eb3..f0b849ef0c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.kt @@ -1579,6 +1579,7 @@ class MmsDatabase(context: Context, databaseHelper: SQLCipherOpenHelper) : Messa SHARED_CONTACTS, LINK_PREVIEWS, UNIDENTIFIED, + HAS_MENTION, "json_group_array(json_object(" + "'" + AttachmentDatabase.ROW_ID + "', " + AttachmentDatabase.TABLE_NAME + "." + AttachmentDatabase.ROW_ID + ", " + "'" + AttachmentDatabase.UNIQUE_ID + "', " + AttachmentDatabase.TABLE_NAME + "." + AttachmentDatabase.UNIQUE_ID + ", " + diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java index ddd12edc86..a5014aacb8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java @@ -105,7 +105,7 @@ public class SmsDatabase extends MessagingDatabase { PROTOCOL, READ, STATUS, TYPE, REPLY_PATH_PRESENT, SUBJECT, BODY, SERVICE_CENTER, DELIVERY_RECEIPT_COUNT, MISMATCHED_IDENTITIES, SUBSCRIPTION_ID, EXPIRES_IN, EXPIRE_STARTED, - NOTIFIED, READ_RECEIPT_COUNT, UNIDENTIFIED, + NOTIFIED, READ_RECEIPT_COUNT, UNIDENTIFIED, HAS_MENTION, "json_group_array(json_object(" + "'" + ReactionDatabase.ROW_ID + "', " + ReactionDatabase.TABLE_NAME + "." + ReactionDatabase.ROW_ID + ", " + "'" + ReactionDatabase.MESSAGE_ID + "', " + ReactionDatabase.TABLE_NAME + "." + ReactionDatabase.MESSAGE_ID + ", " + From 7ffe48b5ed580de50c82192696baacddd3b8018e Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Fri, 27 Jan 2023 15:19:02 +1100 Subject: [PATCH 2/2] Fixed an issue where the message bubble could be sized incorrectly --- .../conversation/v2/messages/VisibleMessageContentView.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt index d53ab45687..f8e655e705 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt @@ -101,6 +101,9 @@ class VisibleMessageContentView : ConstraintLayout { binding.deletedMessageView.root.isVisible = false } + // Note: Need to clear the body to prevent the message bubble getting incorrectly + // sized based on text content from a recycled view + binding.bodyTextView.text = null binding.quoteView.root.isVisible = message is MmsMessageRecord && message.quote != null binding.linkPreviewView.root.isVisible = message is MmsMessageRecord && message.linkPreviews.isNotEmpty() binding.untrustedView.root.isVisible = !contactIsTrusted && message is MmsMessageRecord && message.quote == null && message.linkPreviews.isEmpty()