removing some redundant functions

This commit is contained in:
tibbi 2020-04-11 10:51:48 +02:00
parent f2c368e12e
commit e79818d789
3 changed files with 4 additions and 8 deletions

View file

@ -1,16 +1,10 @@
package com.simplemobiletools.smsmessenger.models
import android.graphics.Bitmap
import android.provider.Telephony
import com.simplemobiletools.smsmessenger.extensions.getThreadTitle
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,
val isMMS: Boolean, val attachment: MessageAttachment?
) : ThreadItem() {
fun isReceivedMessage() = type == Telephony.Sms.MESSAGE_TYPE_INBOX
fun getThreadTitle() = participants.getThreadTitle()
fun getThreadImageUri() = participants.firstOrNull()?.photoUri
}