summary refs log tree commit diff
path: root/src/ChatPage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-25 14:34:15 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-25 14:34:15 +0200
commit0e91dae9223a0b82085e28c42483122681106100 (patch)
tree8d9e189898eb35abedbe126468248fe725617f31 /src/ChatPage.cc
parentResize text input vertically to fit the contents (diff)
downloadnheko-0e91dae9223a0b82085e28c42483122681106100.tar.xz
Erase items using the key
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r--src/ChatPage.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc
index 6d9c87f2..d1a76f83 100644
--- a/src/ChatPage.cc
+++ b/src/ChatPage.cc
@@ -761,8 +761,9 @@ ChatPage::addRoom(const QString &room_id)
 void
 ChatPage::removeRoom(const QString &room_id)
 {
-        roomStates_.erase(roomStates_.find(room_id));
-        roomSettings_.erase(roomSettings_.find(room_id));
+        roomStates_.erase(room_id);
+        roomSettings_.erase(room_id);
+
         try {
                 cache_->removeRoom(room_id);
                 cache_->removeInvite(room_id);