Fixes #225 fix am/pm for timestamps

This commit is contained in:
fourtf
2018-01-17 18:36:12 +01:00
parent 4ddb4616ee
commit f3357cf0f4
12 changed files with 77 additions and 11 deletions
+13
View File
@@ -123,6 +123,8 @@ Split::Split(SplitContainer *parent, const std::string &_uuid)
Split::~Split()
{
this->channelNameUpdated("");
this->usermodeChangedConnection.disconnect();
this->channelIDChangedConnection.disconnect();
}
const std::string &Split::getUUID() const
@@ -144,8 +146,19 @@ void Split::setChannel(SharedChannel _newChannel)
{
this->view.setChannel(_newChannel);
this->usermodeChangedConnection.disconnect();
this->channel = _newChannel;
twitch::TwitchChannel *tc = dynamic_cast<twitch::TwitchChannel *>(_newChannel.get());
if (tc != nullptr) {
this->usermodeChangedConnection =
tc->userStateChanged.connect([this] { this->header.updateModerationModeIcon(); });
}
this->header.updateModerationModeIcon();
this->channelChanged();
}