aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-06-17 00:05:10 +0200
committerChristian Schneppe <christian@pix-art.de>2018-06-17 00:05:10 +0200
commitd5de453f4965fac9491dd6faf0f58cbb36e9423f (patch)
tree048ed12516281b79d9c63709ae95f460568f0703 /src/main/java/de/pixart/messenger
parent7dfb1881420dfc1ba0c309bbbf2c30fc2883fb18 (diff)
introduced config setting to hide error notification
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/Config.java2
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java
index 462d1d66a..0af8e09ea 100644
--- a/src/main/java/de/pixart/messenger/Config.java
+++ b/src/main/java/de/pixart/messenger/Config.java
@@ -63,6 +63,7 @@ public final class Config {
public static final boolean SHOW_CONNECTED_ACCOUNTS = false; //show number of connected accounts in foreground notification
public static final boolean ALWAYS_NOTIFY_BY_DEFAULT = false;
+ public static final boolean SUPPRESS_ERROR_NOTIFICATION = false;
public static final boolean DISABLE_BAN = false; // disables the ability to ban users from rooms
@@ -112,7 +113,6 @@ public final class Config {
public static final boolean DISABLE_PROXY_LOOKUP = false; //useful to debug ibb
public static final boolean DISABLE_HTTP_UPLOAD = false;
- public static final boolean DISABLE_STRING_PREP = false; // setting to true might increase startup performance
public static final boolean EXTENDED_SM_LOGGING = false; // log stanza counts
public static final boolean BACKGROUND_STANZA_LOGGING = false; //log all stanzas that were received while the app is in background
public static final boolean RESET_ATTEMPT_COUNT_ON_NETWORK_CHANGE = true; //setting to true might increase power consumption
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index 03e51bef8..9f8438de3 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -791,6 +791,10 @@ public class NotificationService {
}
public void updateErrorNotification() {
+ if (Config.SUPPRESS_ERROR_NOTIFICATION) {
+ cancel(ERROR_NOTIFICATION_ID);
+ return;
+ }
final List<Account> errors = new ArrayList<>();
for (final Account account : mXmppConnectionService.getAccounts()) {
if (account.hasErrorStatus() && account.showErrorNotification()) {