Merge remote-tracking branch 'upstream/master' into emoji-reacts

This commit is contained in:
Ben Iofel
2025-09-02 18:01:14 -04:00
17 changed files with 227 additions and 176 deletions
@@ -36,7 +36,7 @@ class QkRealmMigration @Inject constructor(
) : RealmMigration {
companion object {
const val SchemaVersion: Long = 13
const val SchemaVersion: Long = 14
}
@SuppressLint("ApplySharedPref")
@@ -239,10 +239,6 @@ class QkRealmMigration @Inject constructor(
// Because there was never any property associated with which conversation/recipients a scheduled message was for,
// we can't update this field on a realm migration. It will be set to a default of 0
version++
}
if (version == 11L) {
realm.schema.create("MessageContentFilter")
.addField("id", Long::class.java, FieldAttribute.PRIMARY_KEY, FieldAttribute.REQUIRED)
.addField("value", String::class.java, FieldAttribute.REQUIRED)
@@ -254,6 +250,13 @@ class QkRealmMigration @Inject constructor(
}
if (version == 12L) {
realm.schema.get("Conversation")
?.addField("draftDate", Long::class.java, FieldAttribute.REQUIRED)
version++
}
if (version == 13L) {
val emojiReactionTable = realm.schema.create("EmojiReaction")
.addField("id", Long::class.java, FieldAttribute.PRIMARY_KEY, FieldAttribute.REQUIRED)
.addField("reactionMessageId", Long::class.java, FieldAttribute.INDEXED, FieldAttribute.REQUIRED)