mirror of
https://github.com/FossifyOrg/Messages.git
synced 2026-06-21 06:51:15 -04:00
adding a null check at message participants
This commit is contained in:
@@ -70,7 +70,7 @@ fun Context.getMessages(threadId: Int? = null): ArrayList<Message> {
|
||||
messages = messages.distinctBy { it.thread }.toMutableList() as ArrayList<Message>
|
||||
}
|
||||
|
||||
messages = messages.filter { !isNumberBlocked(it.participants.first().phoneNumber) }.toMutableList() as ArrayList<Message>
|
||||
messages = messages.filter { !isNumberBlocked(it.participants.firstOrNull()?.phoneNumber ?: "") }.toMutableList() as ArrayList<Message>
|
||||
return messages
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user