diff options
Diffstat (limited to 'Swift/Controllers/Roster/Roster.cpp')
-rw-r--r-- | Swift/Controllers/Roster/Roster.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Swift/Controllers/Roster/Roster.cpp b/Swift/Controllers/Roster/Roster.cpp index 44cf03d..4dbc453 100644 --- a/Swift/Controllers/Roster/Roster.cpp +++ b/Swift/Controllers/Roster/Roster.cpp @@ -197,7 +197,13 @@ void Roster::applyOnAllItems(const RosterItemOperation& operation) { filterAll(); } -void Roster::removeFilter(RosterFilter *filter) { +void Roster::addFilter(RosterFilter* filter) { + filters_.push_back(filter); + filterAll(); + onFilterAdded(filter); +} + +void Roster::removeFilter(RosterFilter* filter) { for (unsigned int i = 0; i < filters_.size(); i++) { if (filters_[i] == filter) { filters_.erase(filters_.begin() + i); @@ -205,6 +211,7 @@ void Roster::removeFilter(RosterFilter *filter) { } } filterAll(); + onFilterRemoved(filter); } void Roster::filterContact(ContactRosterItem* contact, GroupRosterItem* group) { |