show displayed by contact on all devices
This commit is contained in:
parent
4b09f0e9d3
commit
f8be57d43f
|
@ -15,9 +15,7 @@ import android.net.Uri;
|
|||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
|
@ -43,10 +41,7 @@ public class NotificationService {
|
|||
public synchronized void push(Message message) {
|
||||
if (this.mIsInForeground
|
||||
&& this.mOpenConversation == message.getConversation()) {
|
||||
Log.d(Config.LOGTAG,"ignoring notification because foreground and conv matches");
|
||||
return; // simply ignore
|
||||
} else {
|
||||
Log.d(Config.LOGTAG,"pushed new notification");
|
||||
}
|
||||
String conversationUuid = message.getConversationUuid();
|
||||
if (notifications.containsKey(conversationUuid)) {
|
||||
|
@ -185,7 +180,8 @@ public class NotificationService {
|
|||
}
|
||||
|
||||
private PendingIntent createDeleteIntent() {
|
||||
Intent intent = new Intent(mXmppConnectionService, XmppConnectionService.class);
|
||||
Intent intent = new Intent(mXmppConnectionService,
|
||||
XmppConnectionService.class);
|
||||
intent.setAction("clear_notification");
|
||||
return PendingIntent.getService(mXmppConnectionService, 0, intent, 0);
|
||||
}
|
||||
|
|
|
@ -1545,7 +1545,9 @@ public class XmppConnectionService extends Service {
|
|||
public boolean markMessage(Conversation conversation, String uuid,
|
||||
int status) {
|
||||
for (Message message : conversation.getMessages()) {
|
||||
if (message.getUuid().equals(uuid)) {
|
||||
if (message.getUuid().equals(uuid)
|
||||
|| (message.getStatus() >= Message.STATUS_SEND && uuid
|
||||
.equals(message.getRemoteMsgId()))) {
|
||||
markMessage(message, status);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue