mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 03:28:52 +01:00
Fix message caching when sms body is empty
This commit is contained in:
@@ -75,11 +75,15 @@ internal object MessageSyncManager {
|
||||
val columnsMap = ColumnsMap(cursor)
|
||||
|
||||
Realm.getDefaultInstance().executeTransaction {
|
||||
while (cursor.moveToNext())
|
||||
while (cursor.moveToNext()) {
|
||||
|
||||
val body = cursor.getString(columnsMap.mColumnSmsBody) ?: ""
|
||||
|
||||
it.insertOrUpdate(Message(
|
||||
cursor.getLong(columnsMap.mColumnMsgId),
|
||||
threadId,
|
||||
cursor.getString(columnsMap.mColumnSmsBody)))
|
||||
body))
|
||||
}
|
||||
}
|
||||
|
||||
cursor.close()
|
||||
|
||||
Reference in New Issue
Block a user