From 26710c572ffe7c7135573c70951b20ae32756e1e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 15 Feb 2021 18:56:12 +0100 Subject: [PATCH] updating some colors for the white theme --- app/build.gradle | 2 +- .../smsmessenger/activities/NewConversationActivity.kt | 5 ++++- .../com/simplemobiletools/smsmessenger/extensions/Context.kt | 2 +- .../smsmessenger/receivers/SmsStatusSentReceiver.kt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4e462c82..130dba3f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'com.simplemobiletools:commons:5.33.31' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'com.klinkerapps:android-smsmms:5.2.6' - implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a' + implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a' implementation "me.leolin:ShortcutBadger:1.1.22" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt index 17ef2415..88549ae2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt @@ -89,9 +89,12 @@ class NewConversationActivity : SimpleActivity() { } } + val adjustedPrimaryColor = getAdjustedPrimaryColor() contacts_letter_fastscroller.textColor = config.textColor.getColorStateList() + contacts_letter_fastscroller.pressedTextColor = adjustedPrimaryColor contacts_letter_fastscroller_thumb.setupWithFastScroller(contacts_letter_fastscroller) - contacts_letter_fastscroller_thumb.textColor = config.primaryColor.getContrastColor() + contacts_letter_fastscroller_thumb?.textColor = adjustedPrimaryColor.getContrastColor() + contacts_letter_fastscroller_thumb?.thumbColor = adjustedPrimaryColor.getColorStateList() } private fun isThirdPartyIntent(): Boolean { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index b30cf279..e7dfd13c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -709,7 +709,7 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon val builder = NotificationCompat.Builder(this, NOTIFICATION_CHANNEL) .setContentTitle(sender) .setContentText(body) - .setColor(config.primaryColor) + .setColor(getAdjustedPrimaryColor()) .setSmallIcon(R.drawable.ic_messenger) .setLargeIcon(largeIcon) .setStyle(NotificationCompat.BigTextStyle().setSummaryText(summaryText).bigText(body)) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsStatusSentReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsStatusSentReceiver.kt index 7c9054fa..0418c743 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsStatusSentReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsStatusSentReceiver.kt @@ -16,6 +16,7 @@ import android.os.Looper import android.provider.Telephony import androidx.core.app.NotificationCompat import com.klinker.android.send_message.SentReceiver +import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.getMyContactsCursor import com.simplemobiletools.commons.helpers.SimpleContactsHelper import com.simplemobiletools.commons.helpers.ensureBackgroundThread @@ -92,7 +93,7 @@ class SmsStatusSentReceiver : SentReceiver() { val builder = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL) .setContentTitle(context.getString(R.string.message_not_sent_short)) .setContentText(summaryText) - .setColor(context.config.primaryColor) + .setColor(context.getAdjustedPrimaryColor()) .setSmallIcon(R.drawable.ic_messenger) .setLargeIcon(largeIcon) .setStyle(NotificationCompat.BigTextStyle().bigText(summaryText))