Indicate in UI when scheduled messages are present

Added a new property to scheduled messages to save which conversation the scheduled message belongs to.
This commit is contained in:
Inhishonor
2025-07-08 18:22:07 -07:00
parent 56a767bbd7
commit 3d7526512d
19 changed files with 146 additions and 18 deletions
@@ -36,7 +36,7 @@ class QkRealmMigration @Inject constructor(
) : RealmMigration {
companion object {
const val SchemaVersion: Long = 11
const val SchemaVersion: Long = 12
}
@SuppressLint("ApplySharedPref")
@@ -233,6 +233,14 @@ class QkRealmMigration @Inject constructor(
version++
}
if (version == 11L) {
realm.schema.get("ScheduledMessage")
?.addField("conversationId", Long::class.java, FieldAttribute.REQUIRED)
// 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++
}
check(version >= newVersion) { "Migration missing from v$oldVersion to v$newVersion" }
}