diff options
Diffstat (limited to 'Swift/Controllers/BlockListController.cpp')
-rw-r--r-- | Swift/Controllers/BlockListController.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/BlockListController.cpp b/Swift/Controllers/BlockListController.cpp index e7bc45d..6bdb513 100644 --- a/Swift/Controllers/BlockListController.cpp +++ b/Swift/Controllers/BlockListController.cpp @@ -146,9 +146,11 @@ void BlockListController::handleBlockListChanged() { foreach (const JID& jid, jidsToBlock) { + if (std::find(blockListBeforeEdit.begin(), blockListBeforeEdit.end(), jid) == blockListBeforeEdit.end()) { blockListBeforeEdit.push_back(jid); } + } foreach (const JID& jid, jidsToUnblock) { - blockListBeforeEdit.erase(std::remove(blockListBeforeEdit.begin(), blockListBeforeEdit.end(), jid), blockListBeforeEdit.end());; + blockListBeforeEdit.erase(std::remove(blockListBeforeEdit.begin(), blockListBeforeEdit.end(), jid), blockListBeforeEdit.end()); } |