Fixed messages getting added multiple times after roomstate change.

This commit is contained in:
Cranken 2018-09-29 21:53:54 +02:00 committed by pajlada
parent 141fdc7ca8
commit 753b2cf139

View file

@ -296,9 +296,11 @@ QString TwitchChannel::roomId() const
void TwitchChannel::setRoomId(const QString &id) void TwitchChannel::setRoomId(const QString &id)
{ {
(*this->roomID_.access()) = id; if (*this->roomID_.accessConst() != id) {
*this->roomID_.access() = id;
this->roomIdChanged.invoke(); this->roomIdChanged.invoke();
this->loadRecentMessages(); this->loadRecentMessages();
}
} }
AccessGuard<const TwitchChannel::RoomModes> TwitchChannel::accessRoomModes() AccessGuard<const TwitchChannel::RoomModes> TwitchChannel::accessRoomModes()