From 753b2cf1396af212908251110619d1c7af694c2c Mon Sep 17 00:00:00 2001 From: Cranken Date: Sat, 29 Sep 2018 21:53:54 +0200 Subject: [PATCH] Fixed messages getting added multiple times after roomstate change. --- src/providers/twitch/TwitchChannel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 881d02842..a219ce690 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -296,9 +296,11 @@ QString TwitchChannel::roomId() const void TwitchChannel::setRoomId(const QString &id) { - (*this->roomID_.access()) = id; - this->roomIdChanged.invoke(); - this->loadRecentMessages(); + if (*this->roomID_.accessConst() != id) { + *this->roomID_.access() = id; + this->roomIdChanged.invoke(); + this->loadRecentMessages(); + } } AccessGuard TwitchChannel::accessRoomModes()