renaming some variables to make them clearer
This commit is contained in:
parent
20e3ddfa60
commit
269b813a61
|
@ -129,15 +129,15 @@ fun Context.getMMS(threadId: Int? = null, sortOrder: String? = null): ArrayList<
|
||||||
val messages = ArrayList<Message>()
|
val messages = ArrayList<Message>()
|
||||||
val contactsMap = HashMap<Int, Contact>()
|
val contactsMap = HashMap<Int, Contact>()
|
||||||
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
|
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
|
||||||
val id = cursor.getIntValue(Mms._ID)
|
val mmsId = cursor.getIntValue(Mms._ID)
|
||||||
val type = cursor.getIntValue(Mms.MESSAGE_BOX)
|
val type = cursor.getIntValue(Mms.MESSAGE_BOX)
|
||||||
val date = cursor.getLongValue(Mms.DATE).toInt()
|
val date = cursor.getLongValue(Mms.DATE).toInt()
|
||||||
val read = cursor.getIntValue(Mms.READ) == 1
|
val read = cursor.getIntValue(Mms.READ) == 1
|
||||||
val thread = cursor.getIntValue(Mms.THREAD_ID)
|
val threadId = cursor.getIntValue(Mms.THREAD_ID)
|
||||||
val participants = getThreadParticipants(thread, contactsMap)
|
val participants = getThreadParticipants(threadId, contactsMap)
|
||||||
val isMMS = true
|
val isMMS = true
|
||||||
val attachment = getMmsAttachment(id)
|
val attachment = getMmsAttachment(mmsId)
|
||||||
val message = Message(id, attachment?.text ?: "", type, participants, date, read, thread, isMMS, attachment)
|
val message = Message(mmsId, attachment?.text ?: "", type, participants, date, read, threadId, isMMS, attachment)
|
||||||
messages.add(message)
|
messages.add(message)
|
||||||
|
|
||||||
participants.forEach {
|
participants.forEach {
|
||||||
|
|
Loading…
Reference in New Issue