Fix message caching when sms body is empty

This commit is contained in:
Moez Bhatti
2017-07-07 19:33:07 -04:00
parent 4efefee500
commit d8eb265321
@@ -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()