diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 34d6cb8a9..95233084e 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -651,13 +651,13 @@ void ChannelView::messageAppended(MessagePtr &message, if (messageFlags->has(MessageFlag::Highlighted) && !messageFlags->has(MessageFlag::Subscription)) { - this->tabHighlightRequested.invoke(HighlightState::Highlighted); - this->tabHighlightColorRequested.invoke(message->highlightColor); + this->tabHighlightRequested.invoke(HighlightState::Highlighted, + message->highlightColor); } else { - this->tabHighlightRequested.invoke(HighlightState::NewMessage); - this->tabHighlightColorRequested.invoke(nullptr); + this->tabHighlightRequested.invoke(HighlightState::NewMessage, + nullptr); } } diff --git a/src/widgets/helper/ChannelView.hpp b/src/widgets/helper/ChannelView.hpp index 9f6bf64b5..70f9264cf 100644 --- a/src/widgets/helper/ChannelView.hpp +++ b/src/widgets/helper/ChannelView.hpp @@ -85,9 +85,8 @@ public: pajlada::Signals::Signal mouseDown; pajlada::Signals::NoArgSignal selectionChanged; - pajlada::Signals::Signal tabHighlightRequested; - pajlada::Signals::Signal> - tabHighlightColorRequested; + pajlada::Signals::Signal> + tabHighlightRequested; pajlada::Signals::NoArgSignal liveStatusChanged; pajlada::Signals::Signal linkClicked; pajlada::Signals::Signal joinToChannel; diff --git a/src/widgets/splits/SplitContainer.cpp b/src/widgets/splits/SplitContainer.cpp index c14143dcb..5cc218eac 100644 --- a/src/widgets/splits/SplitContainer.cpp +++ b/src/widgets/splits/SplitContainer.cpp @@ -200,17 +200,15 @@ void SplitContainer::addSplit(Split *split) this->refreshTab(); split->getChannelView().tabHighlightRequested.connect( - [this](HighlightState state) { + [this](HighlightState state, std::shared_ptr color) { if (this->tab_ != nullptr) { this->tab_->setHighlightState(state); } - }); - - split->getChannelView().tabHighlightColorRequested.connect( - [this](std::shared_ptr color) { if (color != nullptr) + { this->tab_->setHighlightColor(color); + } }); split->getChannelView().liveStatusChanged.connect([this]() { @@ -271,8 +269,6 @@ SplitContainer::Position SplitContainer::releaseSplit(Split *split) split->getChannelView().tabHighlightRequested.disconnectAll(); - split->getChannelView().tabHighlightColorRequested.disconnectAll(); - return position; }