forked from upstream-mirrors/quik
Fix message caching when sms body is empty
This commit is contained in:
@@ -75,11 +75,15 @@ internal object MessageSyncManager {
|
|||||||
val columnsMap = ColumnsMap(cursor)
|
val columnsMap = ColumnsMap(cursor)
|
||||||
|
|
||||||
Realm.getDefaultInstance().executeTransaction {
|
Realm.getDefaultInstance().executeTransaction {
|
||||||
while (cursor.moveToNext())
|
while (cursor.moveToNext()) {
|
||||||
|
|
||||||
|
val body = cursor.getString(columnsMap.mColumnSmsBody) ?: ""
|
||||||
|
|
||||||
it.insertOrUpdate(Message(
|
it.insertOrUpdate(Message(
|
||||||
cursor.getLong(columnsMap.mColumnMsgId),
|
cursor.getLong(columnsMap.mColumnMsgId),
|
||||||
threadId,
|
threadId,
|
||||||
cursor.getString(columnsMap.mColumnSmsBody)))
|
body))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user