make sure to always update the top menu colors

This commit is contained in:
tibbi 2020-04-19 21:29:01 +02:00
parent ebf2234f3f
commit 5db1695692
3 changed files with 14 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package com.simplemobiletools.smsmessenger.activities
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.WindowManager
import com.reddit.indicatorfastscroll.FastScrollItemIndicator
import com.simplemobiletools.commons.extensions.*
@ -42,6 +43,11 @@ class NewConversationActivity : SimpleActivity() {
no_contacts_placeholder_2.underlineText()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun initContacts() {
if (isThirdPartyIntent()) {
return

View File

@ -4,6 +4,7 @@ import android.annotation.TargetApi
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.view.Menu
import com.simplemobiletools.commons.activities.ManageBlockedNumbersActivity
import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog
import com.simplemobiletools.commons.extensions.*
@ -15,7 +16,7 @@ import kotlinx.android.synthetic.main.activity_settings.*
import java.util.*
class SettingsActivity : SimpleActivity() {
var blockedNumbersAtPause = -1
private var blockedNumbersAtPause = -1
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -42,6 +43,11 @@ class SettingsActivity : SimpleActivity() {
blockedNumbersAtPause = getBlockedNumbers().hashCode()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun setupPurchaseThankYou() {
settings_purchase_thank_you_holder.beVisibleIf(!isThankYouInstalled())
settings_purchase_thank_you_holder.setOnClickListener {

View File

@ -150,6 +150,7 @@ class ThreadActivity : SimpleActivity() {
findItem(R.id.block_number).isVisible = isNougatPlus()
}
updateMenuItemColors(menu)
return true
}