fix: properly handle keyword blocking (#535)
Refs: https://github.com/FossifyOrg/Messages/issues/99
This commit is contained in:
parent
910eccf956
commit
7a291d7804
4 changed files with 9 additions and 8 deletions
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Reordered menu options throughout the app
|
- Reordered menu options throughout the app
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Fixed keyword blocking for MMS messages ([#99])
|
||||||
- Fixed contact number selection when adding members to a group ([#456])
|
- Fixed contact number selection when adding members to a group ([#456])
|
||||||
- Fixed a glitch in pattern lock after incorrect attempts
|
- Fixed a glitch in pattern lock after incorrect attempts
|
||||||
|
|
||||||
|
|
@ -138,6 +139,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#13]: https://github.com/FossifyOrg/Messages/issues/13
|
[#13]: https://github.com/FossifyOrg/Messages/issues/13
|
||||||
[#70]: https://github.com/FossifyOrg/Messages/issues/70
|
[#70]: https://github.com/FossifyOrg/Messages/issues/70
|
||||||
[#75]: https://github.com/FossifyOrg/Messages/issues/75
|
[#75]: https://github.com/FossifyOrg/Messages/issues/75
|
||||||
|
[#99]: https://github.com/FossifyOrg/Messages/issues/99
|
||||||
[#115]: https://github.com/FossifyOrg/Messages/issues/115
|
[#115]: https://github.com/FossifyOrg/Messages/issues/115
|
||||||
[#135]: https://github.com/FossifyOrg/Messages/issues/135
|
[#135]: https://github.com/FossifyOrg/Messages/issues/135
|
||||||
[#153]: https://github.com/FossifyOrg/Messages/issues/153
|
[#153]: https://github.com/FossifyOrg/Messages/issues/153
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ dependencies {
|
||||||
implementation(libs.fossify.commons)
|
implementation(libs.fossify.commons)
|
||||||
implementation(libs.eventbus)
|
implementation(libs.eventbus)
|
||||||
implementation(libs.indicator.fast.scroll)
|
implementation(libs.indicator.fast.scroll)
|
||||||
implementation(libs.android.smsmms)
|
implementation(libs.mmslib)
|
||||||
implementation(libs.androidx.swiperefreshlayout)
|
implementation(libs.androidx.swiperefreshlayout)
|
||||||
implementation(libs.androidx.constraintlayout)
|
implementation(libs.androidx.constraintlayout)
|
||||||
implementation(libs.androidx.lifecycle.process)
|
implementation(libs.androidx.lifecycle.process)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import org.fossify.messages.helpers.ReceiverUtils.isMessageFilteredOut
|
||||||
import org.fossify.messages.helpers.refreshMessages
|
import org.fossify.messages.helpers.refreshMessages
|
||||||
import org.fossify.messages.models.Message
|
import org.fossify.messages.models.Message
|
||||||
|
|
||||||
// more info at https://github.com/klinker41/android-smsmms
|
|
||||||
class MmsReceiver : MmsReceivedReceiver() {
|
class MmsReceiver : MmsReceivedReceiver() {
|
||||||
|
|
||||||
override fun isAddressBlocked(context: Context, address: String): Boolean {
|
override fun isAddressBlocked(context: Context, address: String): Boolean {
|
||||||
|
|
@ -32,6 +31,10 @@ class MmsReceiver : MmsReceivedReceiver() {
|
||||||
return context.isNumberBlocked(normalizedAddress)
|
return context.isNumberBlocked(normalizedAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isContentBlocked(context: Context, content: String): Boolean {
|
||||||
|
return isMessageFilteredOut(context, content)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onMessageReceived(context: Context, messageUri: Uri) {
|
override fun onMessageReceived(context: Context, messageUri: Uri) {
|
||||||
val mms = context.getLatestMMS() ?: return
|
val mms = context.getLatestMMS() ?: return
|
||||||
val address = mms.getSender()?.phoneNumbers?.first()?.normalizedNumber ?: ""
|
val address = mms.getSender()?.phoneNumbers?.first()?.normalizedNumber ?: ""
|
||||||
|
|
@ -62,10 +65,6 @@ class MmsReceiver : MmsReceivedReceiver() {
|
||||||
size: Int,
|
size: Int,
|
||||||
address: String
|
address: String
|
||||||
) {
|
) {
|
||||||
if (isMessageFilteredOut(context, mms.body)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val glideBitmap = try {
|
val glideBitmap = try {
|
||||||
Glide.with(context)
|
Glide.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ eventbus = "3.3.1"
|
||||||
room = "2.8.1"
|
room = "2.8.1"
|
||||||
#Fossify
|
#Fossify
|
||||||
commons = "5.2.0"
|
commons = "5.2.0"
|
||||||
android-smsmms = "c3e678befd"
|
mmslib = "1.0.0"
|
||||||
indicator-fast-scroll = "4524cd0b61"
|
indicator-fast-scroll = "4524cd0b61"
|
||||||
#Gradle
|
#Gradle
|
||||||
gradlePlugins-agp = "8.11.1"
|
gradlePlugins-agp = "8.11.1"
|
||||||
|
|
@ -43,7 +43,7 @@ compose-detekt = { module = "io.nlopez.compose.rules:detekt", version.ref = "det
|
||||||
#Fossify
|
#Fossify
|
||||||
fossify-commons = { module = "org.fossify:commons", version.ref = "commons" }
|
fossify-commons = { module = "org.fossify:commons", version.ref = "commons" }
|
||||||
indicator-fast-scroll = { module = "org.fossify:IndicatorFastScroll", version.ref = "indicator-fast-scroll" }
|
indicator-fast-scroll = { module = "org.fossify:IndicatorFastScroll", version.ref = "indicator-fast-scroll" }
|
||||||
android-smsmms = { module = "org.fossify:android-smsmms", version.ref = "android-smsmms" }
|
mmslib = { module = "org.fossify:mmslib", version.ref = "mmslib" }
|
||||||
#EventBus
|
#EventBus
|
||||||
eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
|
eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
|
||||||
#Helpers
|
#Helpers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue