Use display/localized names in tab and split titles (#2189)

This commit is contained in:
fanway
2020-12-06 16:07:33 +03:00
committed by GitHub
parent f1660bfc55
commit bf4c9cebb1
10 changed files with 71 additions and 5 deletions
+4
View File
@@ -381,6 +381,10 @@ void Split::setChannel(IndirectChannel newChannel)
this->header_->setViewersButtonVisible(false);
}
this->channel_.get()->displayNameChanged.connect([this] {
this->container_->refreshTab();
});
this->channelChanged.invoke();
// Queue up save because: Split channel changed
+1 -1
View File
@@ -788,7 +788,7 @@ void SplitContainer::refreshTabTitle()
for (const auto &chatWidget : this->splits_)
{
auto channelName = chatWidget->getChannel()->getName();
auto channelName = chatWidget->getChannel()->getLocalizedName();
if (channelName.isEmpty())
{
continue;
+1 -1
View File
@@ -659,7 +659,7 @@ void SplitHeader::updateChannelText()
this->isLive_ = false;
this->tooltipText_ = QString();
auto title = channel->getName();
auto title = channel->getLocalizedName();
if (indirectChannel.getType() == Channel::Type::TwitchWatching)
title = "watching: " + (title.isEmpty() ? "none" : title);