mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-23 06:08:52 +01:00
Sort backed up messages chronologically
This commit is contained in:
@@ -76,7 +76,7 @@ class BackupRepositoryImpl @Inject constructor(
|
|||||||
// Map all the messages into our object we'll use for the Json mapping
|
// Map all the messages into our object we'll use for the Json mapping
|
||||||
val backupMessages = Realm.getDefaultInstance().use { realm ->
|
val backupMessages = Realm.getDefaultInstance().use { realm ->
|
||||||
// Get the messages from realm
|
// Get the messages from realm
|
||||||
val messages = realm.where(Message::class.java).findAll().createSnapshot()
|
val messages = realm.where(Message::class.java).sort("date").findAll().createSnapshot()
|
||||||
val messageCount = messages.size
|
val messageCount = messages.size
|
||||||
|
|
||||||
// Map the messages to the new format
|
// Map the messages to the new format
|
||||||
|
|||||||
Reference in New Issue
Block a user