Fix message grouping

This commit is contained in:
Ben Iofel
2025-08-27 23:15:23 -04:00
parent 8a90923d7b
commit 2ddcf9b68e
6 changed files with 16 additions and 27 deletions
@@ -25,9 +25,6 @@ import io.realm.annotations.PrimaryKey
open class EmojiReaction : RealmObject() {
@PrimaryKey var id: Long = 0
/** The message this is a reaction to */
@Index var targetMessageId: Long = 0
/** The reaction message ID itself */
@Index var reactionMessageId: Long = 0
@@ -26,6 +26,7 @@ import android.provider.Telephony.Sms
import dev.octoshrimpy.quik.extensions.joinTo
import io.realm.RealmList
import io.realm.RealmObject
import io.realm.RealmResults
import io.realm.annotations.Index
import io.realm.annotations.PrimaryKey
@@ -74,7 +75,10 @@ open class Message : RealmObject() {
var subject: String = ""
var textContentType: String = ""
var parts: RealmList<MmsPart> = RealmList()
/** is this message a reaction to another message? */
var isEmojiReaction: Boolean = false
/** emoji reactions to this message */
val emojiReactions: RealmList<EmojiReaction> = RealmList()
fun getUri(): Uri {
val baseUri = if (isMms()) Mms.CONTENT_URI else Sms.CONTENT_URI