diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index ed0e9e3c0..22d362932 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 e2a2ba673..1e7f03391 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 000000000..d02809fca 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 000000000..9120ab9d2 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 000000000..bd98cc74c 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 000000000..8344065ee 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 000000000..dff8324fe 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 e5b68c10c..b6183606a 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 5f1eda0fc..3792c2ada 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 +