mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
renaming some variables to make them clearer
This commit is contained in:
@ -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 {
|
||||||
|
Reference in New Issue
Block a user