aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/XmppActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index 934c696f0..7c994c31a 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -284,6 +284,9 @@ public abstract class XmppActivity extends Activity {
if (this instanceof OnUpdateBlocklist) {
this.xmppConnectionService.setOnUpdateBlocklistListener((OnUpdateBlocklist) this);
}
+ if (this instanceof XmppConnectionService.OnShowErrorToast) {
+ this.xmppConnectionService.setOnShowErrorToastListener((XmppConnectionService.OnShowErrorToast) this);
+ }
}
protected void unregisterListeners() {
@@ -302,6 +305,9 @@ public abstract class XmppActivity extends Activity {
if (this instanceof OnUpdateBlocklist) {
this.xmppConnectionService.removeOnUpdateBlocklistListener();
}
+ if (this instanceof XmppConnectionService.OnShowErrorToast) {
+ this.xmppConnectionService.removeOnShowErrorToastListener();
+ }
}
@Override
@@ -328,14 +334,14 @@ public abstract class XmppActivity extends Activity {
super.onCreate(savedInstanceState);
metrics = getResources().getDisplayMetrics();
ExceptionHelper.init(getApplicationContext());
- mPrimaryTextColor = getResources().getColor(R.color.primarytext);
- mSecondaryTextColor = getResources().getColor(R.color.secondarytext);
- mColorRed = getResources().getColor(R.color.red);
- mColorOrange = getResources().getColor(R.color.orange);
- mColorGreen = getResources().getColor(R.color.green);
- mPrimaryColor = getResources().getColor(R.color.primary);
- mPrimaryBackgroundColor = getResources().getColor(R.color.primarybackground);
- mSecondaryBackgroundColor = getResources().getColor(R.color.secondarybackground);
+ mPrimaryTextColor = getResources().getColor(R.color.black87);
+ mSecondaryTextColor = getResources().getColor(R.color.black54);
+ mColorRed = getResources().getColor(R.color.red500);
+ mColorOrange = getResources().getColor(R.color.orange500);
+ mColorGreen = getResources().getColor(R.color.green500);
+ mPrimaryColor = getResources().getColor(R.color.green500);
+ mPrimaryBackgroundColor = getResources().getColor(R.color.grey50);
+ mSecondaryBackgroundColor = getResources().getColor(R.color.grey200);
this.mTheme = findTheme();
setTheme(this.mTheme);
this.mUsingEnterKey = usingEnterKey();
@@ -447,14 +453,11 @@ public abstract class XmppActivity extends Activity {
@Override
public void success(Account account) {
- xmppConnectionService.databaseBackend
- .updateAccount(account);
+ xmppConnectionService.databaseBackend.updateAccount(account);
xmppConnectionService.sendPresence(account);
if (conversation != null) {
- conversation
- .setNextEncryption(Message.ENCRYPTION_PGP);
- xmppConnectionService.databaseBackend
- .updateConversation(conversation);
+ conversation.setNextEncryption(Message.ENCRYPTION_PGP);
+ xmppConnectionService.databaseBackend.updateConversation(conversation);
}
}
@@ -716,10 +719,6 @@ public abstract class XmppActivity extends Activity {
return this.mColorRed;
}
- public int getPrimaryColor() {
- return this.mPrimaryColor;
- }
-
public int getOnlineColor() {
return this.mColorGreen;
}