aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/utils')
-rw-r--r--src/eu/siacs/conversations/utils/UIHelper.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java
index fecfaa61..7ae2b745 100644
--- a/src/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/eu/siacs/conversations/utils/UIHelper.java
@@ -107,8 +107,8 @@ public class UIHelper {
return bitmap;
}
- public static Notification getUnreadMessageNotification(Context context,
- List<Conversation> conversations) {
+ public static Notification getNotification(Context context,
+ List<Conversation> conversations, boolean notify) {
String targetUuid = "";
List<Conversation> unread = new ArrayList<Conversation>();
@@ -169,9 +169,11 @@ public class UIHelper {
mBuilder.setStyle(style);
}
mBuilder.setSmallIcon(R.drawable.notification);
- mBuilder.setLights(0xffffffff, 2000, 4000);
- if (ringtone != null) {
- mBuilder.setSound(Uri.parse(ringtone));
+ if (notify) {
+ mBuilder.setLights(0xffffffff, 2000, 4000);
+ if (ringtone != null) {
+ mBuilder.setSound(Uri.parse(ringtone));
+ }
}
TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);