forked from upstream-mirrors/quik
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
|
||||
val backupMessages = Realm.getDefaultInstance().use { 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
|
||||
|
||||
// Map the messages to the new format
|
||||
|
||||
Reference in New Issue
Block a user