File tree Expand file tree Collapse file tree 4 files changed +13
-22
lines changed
src/main/kotlin/com/simplemobiletools/smsmessenger Expand file tree Collapse file tree 4 files changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ android {
5656}
5757
5858dependencies {
59- implementation ' com.simplemobiletools:commons:5.25.21 '
59+ implementation ' com.simplemobiletools:commons:5.26.4 '
6060 implementation ' androidx.constraintlayout:constraintlayout:2.0.0-beta4'
6161 implementation ' org.greenrobot:eventbus:3.2.0'
6262 implementation ' com.klinkerapps:android-smsmms:5.2.6'
Original file line number Diff line number Diff line change 1- # Add project specific ProGuard rules here.
2- # You can control the set of applied configuration files using the
3- # proguardFiles setting in build.gradle.
4- #
5- # For more details, see
6- # http://developer.android.com/guide/developing/tools/proguard.html
7-
8- # If your project uses WebView with JS, uncomment the following
9- # and specify the fully qualified class name to the JavaScript interface
10- # class:
11- #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12- # public *;
13- #}
14-
15- # Uncomment this to preserve the line number information for
16- # debugging stack traces.
17- #-keepattributes SourceFile,LineNumberTable
18-
19- # If you keep the line number information, uncomment this to
20- # hide the original source file name.
21- #-renamesourcefileattribute SourceFile
1+ # EventBus
2+ -keepattributes *Annotation*
3+ -keepclassmembers class ** {
4+ @org.greenrobot.eventbus.Subscribe <methods>;
5+ }
6+ -keep enum org.greenrobot.eventbus.ThreadMode { *; }
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import com.klinker.android.send_message.Transaction
2929import com.simplemobiletools.commons.dialogs.ConfirmationDialog
3030import com.simplemobiletools.commons.extensions.*
3131import com.simplemobiletools.commons.helpers.ensureBackgroundThread
32+ import com.simplemobiletools.commons.helpers.isNougatPlus
3233import com.simplemobiletools.smsmessenger.R
3334import com.simplemobiletools.smsmessenger.adapters.AutoCompleteTextViewAdapter
3435import com.simplemobiletools.smsmessenger.adapters.ThreadAdapter
@@ -146,6 +147,7 @@ class ThreadActivity : SimpleActivity() {
146147 menuInflater.inflate(R .menu.menu_thread, menu)
147148 menu.apply {
148149 findItem(R .id.delete).isVisible = threadItems.isNotEmpty()
150+ findItem(R .id.block_number).isVisible = isNougatPlus()
149151 }
150152
151153 return true
Original file line number Diff line number Diff line change @@ -619,6 +619,10 @@ fun Context.getThreadId(addresses: Set<String>): Long {
619619}
620620
621621fun Context.isNumberBlocked (number : String ): Boolean {
622+ if (! isNougatPlus()) {
623+ return false
624+ }
625+
622626 val blockedNumbers = getBlockedNumbers()
623627 val numberToCompare = number.trimToComparableNumber()
624628 return blockedNumbers.map { it.numberToCompare }.contains(numberToCompare) || blockedNumbers.map { it.number }.contains(numberToCompare)
You can’t perform that action at this time.
0 commit comments