summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster/ContactRosterItem.cpp')
-rw-r--r--Swiften/Roster/ContactRosterItem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Roster/ContactRosterItem.cpp b/Swiften/Roster/ContactRosterItem.cpp
index 37fc6af..9c7af32 100644
--- a/Swiften/Roster/ContactRosterItem.cpp
+++ b/Swiften/Roster/ContactRosterItem.cpp
@@ -73,6 +73,7 @@ void ContactRosterItem::calculateShownPresence() {
void ContactRosterItem::clearPresence() {
presences_.clear();
calculateShownPresence();
+ onDataChanged();
}
void ContactRosterItem::applyPresence(const String& resource, boost::shared_ptr<Presence> presence) {
@@ -88,7 +89,7 @@ void ContactRosterItem::applyPresence(const String& resource, boost::shared_ptr<
presences_.erase(resource);
}
}
- if (presences_.size() > 0) {
+ if (presences_.size() == 0) {
offlinePresence_ = presence;
}
} else {