aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-08 06:25:35 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-08 06:25:35 +0100
commitaa31732ea3b66201780975eae3305c9e80cc2d11 (patch)
tree3bc36d403a85250722ac05e70dccad891d8695f1 /src/eu/siacs/conversations/ui
parent83c5fdaf0efcb3c85c0d753b347d0a53c7ac9495 (diff)
last part. update notification if user reads them
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java3
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index f8e22dad2..07ac5518f 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -232,6 +232,7 @@ public class ConversationActivity extends XmppActivity {
invalidateOptionsMenu();
if (!getSelectedConversation().isRead()) {
getSelectedConversation().markRead();
+ UIHelper.updateNotification(getApplicationContext(), getConversationList(), false);
updateConversationList();
}
}
@@ -400,8 +401,6 @@ public class ConversationActivity extends XmppActivity {
public void onStart() {
super.onStart();
- NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- nm.cancelAll();
if (conversationList.size()>=1) {
onConvChanged.onConversationListChanged();
}
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 3b8b6888f..aab712087 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -24,6 +24,8 @@ import eu.siacs.conversations.utils.PhoneHelper;
import eu.siacs.conversations.utils.UIHelper;
import android.app.AlertDialog;
import android.app.Fragment;
+import android.app.NotificationManager;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender;
@@ -346,10 +348,6 @@ public class ConversationFragment extends Fragment {
}
}
- if (!conversation.isRead()) {
- conversation.markRead();
- activity.updateConversationList();
- }
if (queuedPqpMessage != null) {
this.conversation.nextMessageEncryption = Message.ENCRYPTION_PGP;
Message message = new Message(conversation, queuedPqpMessage,
@@ -421,6 +419,8 @@ public class ConversationFragment extends Fragment {
messagesView.setSelection(size - 1);
if (!activity.shouldPaneBeOpen()) {
conversation.markRead();
+ //TODO update notifications
+ UIHelper.updateNotification(getActivity(), activity.getConversationList(), false);
activity.updateConversationList();
}
}