diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index ed0e9e3c03b3326ae28c6c1cb37e923c3065e11c..22d36293253163fff4fd4a5563fd0a83109090cb 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -51,7 +51,6 @@ public final class Config { //Notification settings public static final boolean HIDE_MESSAGE_TEXT_IN_NOTIFICATION = false; - 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; diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index e2a2ba673d2ebbe7f8137bf62c58df5936e5f192..1e7f033918b33d55bb711d91b9d82530035686b7 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -901,28 +901,24 @@ public class NotificationService { Notification createForegroundNotification() { final Notification.Builder mBuilder = new Notification.Builder(mXmppConnectionService); mBuilder.setContentTitle(mXmppConnectionService.getString(R.string.app_name)); - if (Compatibility.runsAndTargetsTwentySix(mXmppConnectionService) || Config.SHOW_CONNECTED_ACCOUNTS) { - final List accounts = mXmppConnectionService.getAccounts(); - int enabled = 0; - int connected = 0; - if (accounts != null) { - for (Account account : accounts) { - if (account.isOnlineAndConnected()) { - connected++; - enabled++; - } else if (account.isEnabled()) { - enabled++; - } + final List accounts = mXmppConnectionService.getAccounts(); + int enabled = 0; + int connected = 0; + if (accounts != null) { + for (Account account : accounts) { + if (account.isOnlineAndConnected()) { + connected++; + enabled++; + } else if (account.isEnabled()) { + enabled++; } } - mBuilder.setContentText(mXmppConnectionService.getString(R.string.connected_accounts, connected, enabled)); - } else { - mBuilder.setContentText(mXmppConnectionService.getString(R.string.touch_to_open_conversations)); } + mBuilder.setContentText(mXmppConnectionService.getString(R.string.connected_accounts, connected, enabled)); mBuilder.setContentIntent(createOpenConversationsIntent()); mBuilder.setWhen(0); mBuilder.setPriority(Notification.PRIORITY_MIN); - mBuilder.setSmallIcon(R.drawable.ic_link_white_24dp); + mBuilder.setSmallIcon(connected > 0 ? R.drawable.ic_link_white_24dp : R.drawable.ic_link_off_white_24dp); if (Compatibility.runsTwentySix()) { mBuilder.setChannelId("foreground"); diff --git a/src/main/res/drawable-hdpi/ic_link_off_white_24dp.png b/src/main/res/drawable-hdpi/ic_link_off_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..d02809fca46ece467a4038374ff8ae574759425c Binary files /dev/null and b/src/main/res/drawable-hdpi/ic_link_off_white_24dp.png differ diff --git a/src/main/res/drawable-mdpi/ic_link_off_white_24dp.png b/src/main/res/drawable-mdpi/ic_link_off_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..9120ab9d2f4f918349e0bf2eea5dd02c9617ef9a Binary files /dev/null and b/src/main/res/drawable-mdpi/ic_link_off_white_24dp.png differ diff --git a/src/main/res/drawable-xhdpi/ic_link_off_white_24dp.png b/src/main/res/drawable-xhdpi/ic_link_off_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..bd98cc74ca87b74678eb41148d8569779d950046 Binary files /dev/null and b/src/main/res/drawable-xhdpi/ic_link_off_white_24dp.png differ diff --git a/src/main/res/drawable-xxhdpi/ic_link_off_white_24dp.png b/src/main/res/drawable-xxhdpi/ic_link_off_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..8344065ee5aaafb737ffb084afe987aeaa5f4db6 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/ic_link_off_white_24dp.png differ diff --git a/src/main/res/drawable-xxxhdpi/ic_link_off_white_24dp.png b/src/main/res/drawable-xxxhdpi/ic_link_off_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..dff8324fed02373c1587c77b4018a05f7aa02411 Binary files /dev/null and b/src/main/res/drawable-xxxhdpi/ic_link_off_white_24dp.png differ diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index e5b68c10cfa9b2dc5a08f3b2ace364b8d5ed4e06..b6183606a26b407760a3cada5b1ff36d86b0439f 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -400,7 +400,6 @@ PDF document Android App Contact - Touch to open Conversations Avatar has been published! Sending %s Offering %s diff --git a/src/quicksy/res/values/strings.xml b/src/quicksy/res/values/strings.xml index 5f1eda0fcf14608b453a1fb4418b45ff01f50279..3792c2adab2cb4d02de662cdd2b70141c7c49541 100644 --- a/src/quicksy/res/values/strings.xml +++ b/src/quicksy/res/values/strings.xml @@ -7,7 +7,6 @@ Quicksy is unable to encrypt your messages because your contacts are not announcing their public key.\n\nPlease ask your contacts to setup OpenPGP. The length of time Quicksy keeps quiet after seeing activity on another device By sending in stack traces you are helping the ongoing development of Quicksy - Touch to open Quicksy Quicksy needs access to external storage Quicksy needs access to the camera Your device is doing some heavy battery optimizations on Quicksy that might lead to delayed notifications or even message loss.\nIt is recommended to disable those. @@ -20,4 +19,4 @@ Quicksy needs access to the microphone This notification category is used to display a permanent notification indicating that Quicksy is running. Quicksy profile picture - \ No newline at end of file +