mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Fixed crash in addMessageFromUri
This commit is contained in:
@@ -202,7 +202,12 @@ class MessageRepository @Inject constructor(
|
||||
fun addMessageFromUri(uri: Uri) {
|
||||
val cursor = context.contentResolver.query(uri, null, null, null, "date DESC")
|
||||
val columnsMap = CursorToMessage.MessageColumns(cursor)
|
||||
cursorToMessageFlowable.map(Pair(cursor, columnsMap)).insertOrUpdate()
|
||||
|
||||
if (cursor.moveToFirst()) {
|
||||
cursorToMessageFlowable.map(Pair(cursor, columnsMap)).insertOrUpdate()
|
||||
}
|
||||
|
||||
cursor.close()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user