Commit 086ea51d authored by Alexander Ivanov's avatar Alexander Ivanov

Fix notifications in Android 4+ for disabled persistent icon. Close #105.

parent 1064e68f
......@@ -391,7 +391,7 @@ public class NotificationManager implements OnInitializedListener,
chatViews.setTextViewText(R.id.text, status);
Notification notification = new Notification();
if (Application.SDK_INT >= 14) {
if (Application.SDK_INT >= 14 && SettingsManager.eventsPersistent()) {
// Ongoing icons are in the left side, so hide this one.
notification.icon = R.drawable.ic_placeholder;
notification.when = Long.MIN_VALUE;
......@@ -429,7 +429,7 @@ public class NotificationManager implements OnInitializedListener,
persistentNotification.defaults = 0;
persistentNotification.sound = null;
persistentNotification.tickerText = null;
if (Application.SDK_INT >= 14) {
if (Application.SDK_INT >= 14 && SettingsManager.eventsPersistent()) {
// Ongoing icons are in the left side, so always use it.
persistentNotification.when = startTime;
if (messageNotifications.isEmpty()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment