filter out messages where every participant is blocked, or somehow invalid
This commit is contained in:
parent
e0052d5516
commit
6544351480
2 changed files with 2 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.25.4'
|
implementation 'com.simplemobiletools:commons:5.25.6'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||||
implementation 'com.klinkerapps:android-smsmms:5.2.6'
|
implementation 'com.klinkerapps:android-smsmms:5.2.6'
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ fun Context.getMessages(threadId: Int? = null): ArrayList<Message> {
|
||||||
}
|
}
|
||||||
|
|
||||||
messages = messages.filter { !isNumberBlocked(it.participants.firstOrNull()?.phoneNumber ?: "") }.toMutableList() as ArrayList<Message>
|
messages = messages.filter { !isNumberBlocked(it.participants.firstOrNull()?.phoneNumber ?: "") }.toMutableList() as ArrayList<Message>
|
||||||
|
messages = messages.filter { it.participants.isNotEmpty() }.toMutableList() as ArrayList<Message>
|
||||||
return messages
|
return messages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue