Theme info messages primary color

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-08-04 14:35:37 +02:00
parent 34d6da68a1
commit 46f6e729a1
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 10 additions and 3 deletions

View file

@ -562,7 +562,9 @@ class SettingsController : NewBaseController(R.layout.controller_settings) {
if (ApplicationWideMessageHolder.getInstance().messageType != null) {
when (ApplicationWideMessageHolder.getInstance().messageType) {
ApplicationWideMessageHolder.MessageType.ACCOUNT_UPDATED_NOT_ADDED -> {
binding.messageText.setTextColor(resources!!.getColor(R.color.colorPrimary))
binding.messageText.setTextColor(
viewThemeUtils.getScheme(binding.messageText.context).primary
)
binding.messageText.text = resources!!.getString(R.string.nc_settings_account_updated)
binding.messageView.visibility = View.VISIBLE
}
@ -571,13 +573,17 @@ class SettingsController : NewBaseController(R.layout.controller_settings) {
binding.messageText.setTextColor(resources!!.getColor(R.color.nc_darkRed))
binding.messageText.text = resources!!.getString(R.string.nc_settings_wrong_account)
binding.messageView.visibility = View.VISIBLE
binding.messageText.setTextColor(resources!!.getColor(R.color.colorPrimary))
binding.messageText.setTextColor(
viewThemeUtils.getScheme(binding.messageText.context).primary
)
binding.messageText.text = resources!!.getString(R.string.nc_Server_account_imported)
binding.messageView.visibility = View.VISIBLE
}
ApplicationWideMessageHolder.MessageType.ACCOUNT_WAS_IMPORTED -> {
binding.messageText.setTextColor(resources!!.getColor(R.color.colorPrimary))
binding.messageText.setTextColor(
viewThemeUtils.getScheme(binding.messageText.context).primary
)
binding.messageText.text = resources!!.getString(R.string.nc_Server_account_imported)
binding.messageView.visibility = View.VISIBLE
}

View file

@ -346,6 +346,7 @@ public class NotificationWorker extends Worker {
if (Build.VERSION.SDK_INT >= 23) {
// This method should exist since API 21, but some phones don't have it
// So as a safeguard, we don't use it until 23
notificationBuilder.setColor(context.getResources().getColor(R.color.colorPrimary));
}