update last presence only for messages

This commit is contained in:
Daniel Gultsch 2015-01-03 13:01:38 +01:00
parent 715c8545f4
commit 521c289db1
2 changed files with 2 additions and 6 deletions

View file

@ -2,8 +2,6 @@ package eu.siacs.conversations.parser;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.Locale; import java.util.Locale;
@ -11,7 +9,6 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.jid.InvalidJidException;
import eu.siacs.conversations.xmpp.jid.Jid; import eu.siacs.conversations.xmpp.jid.Jid;
public abstract class AbstractParser { public abstract class AbstractParser {

View file

@ -72,9 +72,8 @@ public class PresenceParser extends AbstractParser implements
} }
} }
boolean online = sizeBefore < contact.getPresences().size(); boolean online = sizeBefore < contact.getPresences().size();
updateLastseen(packet, account, true); updateLastseen(packet, account, false);
mXmppConnectionService.onContactStatusChanged mXmppConnectionService.onContactStatusChanged.onContactStatusChanged(contact, online);
.onContactStatusChanged(contact, online);
} else if (type.equals("unavailable")) { } else if (type.equals("unavailable")) {
if (from.isBareJid()) { if (from.isBareJid()) {
contact.clearPresences(); contact.clearPresences();