aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-08 05:59:31 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-08 05:59:31 +0100
commit9a5a429888409fb4e52432e86f8dca49d4e97cdb (patch)
tree85ffd05c59b6e7582a39e58c803c6349f8acba37 /src/eu/siacs/conversations/utils
parent02883a7ac43cf5014d0a938e18960d8888795ddb (diff)
step two towards nicer notifications. mark read if carbon arrives
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 fecfaa61b..7ae2b745e 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);