aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <inputmice@siacs.eu>2015-01-03 13:01:38 +0100
committerDaniel Gultsch <inputmice@siacs.eu>2015-01-03 13:01:38 +0100
commit521c289db1daee5e1314e808b9d8b0f0fe7f89ee (patch)
treed59469b9c0892dc92e6aec7330ed88f093642789 /src/main
parent715c8545f4fcd7d7a0ca850afc4455ba25d21f99 (diff)
update last presence only for messages
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/AbstractParser.java3
-rw-r--r--src/main/java/eu/siacs/conversations/parser/PresenceParser.java5
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/AbstractParser.java b/src/main/java/eu/siacs/conversations/parser/AbstractParser.java
index 8afc2ae0..08070c08 100644
--- a/src/main/java/eu/siacs/conversations/parser/AbstractParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/AbstractParser.java
@@ -2,8 +2,6 @@ package eu.siacs.conversations.parser;
import java.text.ParseException;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.Date;
import java.util.Locale;
@@ -11,7 +9,6 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.xml.Element;
-import eu.siacs.conversations.xmpp.jid.InvalidJidException;
import eu.siacs.conversations.xmpp.jid.Jid;
public abstract class AbstractParser {
diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
index 684713f0..accb56ea 100644
--- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
@@ -72,9 +72,8 @@ public class PresenceParser extends AbstractParser implements
}
}
boolean online = sizeBefore < contact.getPresences().size();
- updateLastseen(packet, account, true);
- mXmppConnectionService.onContactStatusChanged
- .onContactStatusChanged(contact, online);
+ updateLastseen(packet, account, false);
+ mXmppConnectionService.onContactStatusChanged.onContactStatusChanged(contact, online);
} else if (type.equals("unavailable")) {
if (from.isBareJid()) {
contact.clearPresences();