couple more threading improvements here and there

This commit is contained in:
tibbi 2020-04-08 22:15:43 +02:00
parent 8b37aab610
commit 156620c917
10 changed files with 64 additions and 132 deletions

View file

@ -1,9 +1,12 @@
package com.simplemobiletools.smsmessenger.models
import android.provider.Telephony
import android.text.TextUtils
data class Message(
val id: Int, val body: String, val type: Int, val participants: ArrayList<Contact>, val date: Int, val read: Boolean, val thread: Int
) : ThreadItem() {
fun isReceivedMessage() = type == Telephony.Sms.MESSAGE_TYPE_INBOX
fun getThreadTitle() = TextUtils.join(", ", participants.map { it.name }.toTypedArray())
}

View file

@ -1,3 +0,0 @@
package com.simplemobiletools.smsmessenger.models
data class MessagingThread(val id: Int, val title: String, val address: String)