diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-03 13:01:38 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-03 13:01:38 +0100 |
commit | 521c289db1daee5e1314e808b9d8b0f0fe7f89ee (patch) | |
tree | d59469b9c0892dc92e6aec7330ed88f093642789 /src/main/java/eu/siacs/conversations/parser | |
parent | 715c8545f4fcd7d7a0ca850afc4455ba25d21f99 (diff) |
update last presence only for messages
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/AbstractParser.java | 3 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/PresenceParser.java | 5 |
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 8afc2ae0b..08070c080 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 684713f00..accb56eac 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(); |