removing the id field at conversations, use thread_id
This commit is contained in:
parent
1c6d19c986
commit
d1616d4997
6 changed files with 30 additions and 21 deletions
|
|
@ -2,8 +2,5 @@ package com.simplemobiletools.smsmessenger.extensions
|
|||
|
||||
import android.text.TextUtils
|
||||
import com.simplemobiletools.commons.models.SimpleContact
|
||||
import com.simplemobiletools.smsmessenger.models.Conversation
|
||||
|
||||
fun ArrayList<SimpleContact>.getThreadTitle() = TextUtils.join(", ", map { it.name }.toTypedArray())
|
||||
|
||||
fun ArrayList<Conversation>.getHashToCompare() = map { it.getStringToCompare() }.hashCode()
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ fun Context.getConversations(threadId: Long? = null, privateContacts: ArrayList<
|
|||
val photoUri = if (phoneNumbers.size == 1) simpleContactHelper.getPhotoUriFromPhoneNumber(phoneNumbers.first()) else ""
|
||||
val isGroupConversation = phoneNumbers.size > 1
|
||||
val read = cursor.getIntValue(Threads.READ) == 1
|
||||
val conversation = Conversation(null, id, snippet, date.toInt(), read, title, photoUri, isGroupConversation, phoneNumbers.first())
|
||||
val conversation = Conversation(id, snippet, date.toInt(), read, title, photoUri, isGroupConversation, phoneNumbers.first())
|
||||
conversations.add(conversation)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue