mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Remove tabHighlightColorRequested signal
Moved the functionality to tabHighlightRequested instead of having two signals that modify similar things
This commit is contained in:
parent
e9bebfe788
commit
2a9b8e15c4
|
@ -651,13 +651,13 @@ void ChannelView::messageAppended(MessagePtr &message,
|
||||||
if (messageFlags->has(MessageFlag::Highlighted) &&
|
if (messageFlags->has(MessageFlag::Highlighted) &&
|
||||||
!messageFlags->has(MessageFlag::Subscription))
|
!messageFlags->has(MessageFlag::Subscription))
|
||||||
{
|
{
|
||||||
this->tabHighlightRequested.invoke(HighlightState::Highlighted);
|
this->tabHighlightRequested.invoke(HighlightState::Highlighted,
|
||||||
this->tabHighlightColorRequested.invoke(message->highlightColor);
|
message->highlightColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->tabHighlightRequested.invoke(HighlightState::NewMessage);
|
this->tabHighlightRequested.invoke(HighlightState::NewMessage,
|
||||||
this->tabHighlightColorRequested.invoke(nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,9 +85,8 @@ public:
|
||||||
|
|
||||||
pajlada::Signals::Signal<QMouseEvent *> mouseDown;
|
pajlada::Signals::Signal<QMouseEvent *> mouseDown;
|
||||||
pajlada::Signals::NoArgSignal selectionChanged;
|
pajlada::Signals::NoArgSignal selectionChanged;
|
||||||
pajlada::Signals::Signal<HighlightState> tabHighlightRequested;
|
pajlada::Signals::Signal<HighlightState, std::shared_ptr<QColor>>
|
||||||
pajlada::Signals::Signal<std::shared_ptr<QColor>>
|
tabHighlightRequested;
|
||||||
tabHighlightColorRequested;
|
|
||||||
pajlada::Signals::NoArgSignal liveStatusChanged;
|
pajlada::Signals::NoArgSignal liveStatusChanged;
|
||||||
pajlada::Signals::Signal<const Link &> linkClicked;
|
pajlada::Signals::Signal<const Link &> linkClicked;
|
||||||
pajlada::Signals::Signal<QString> joinToChannel;
|
pajlada::Signals::Signal<QString> joinToChannel;
|
||||||
|
|
|
@ -200,17 +200,15 @@ void SplitContainer::addSplit(Split *split)
|
||||||
this->refreshTab();
|
this->refreshTab();
|
||||||
|
|
||||||
split->getChannelView().tabHighlightRequested.connect(
|
split->getChannelView().tabHighlightRequested.connect(
|
||||||
[this](HighlightState state) {
|
[this](HighlightState state, std::shared_ptr<QColor> color) {
|
||||||
if (this->tab_ != nullptr)
|
if (this->tab_ != nullptr)
|
||||||
{
|
{
|
||||||
this->tab_->setHighlightState(state);
|
this->tab_->setHighlightState(state);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
split->getChannelView().tabHighlightColorRequested.connect(
|
|
||||||
[this](std::shared_ptr<QColor> color) {
|
|
||||||
if (color != nullptr)
|
if (color != nullptr)
|
||||||
|
{
|
||||||
this->tab_->setHighlightColor(color);
|
this->tab_->setHighlightColor(color);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
split->getChannelView().liveStatusChanged.connect([this]() {
|
split->getChannelView().liveStatusChanged.connect([this]() {
|
||||||
|
@ -271,8 +269,6 @@ SplitContainer::Position SplitContainer::releaseSplit(Split *split)
|
||||||
|
|
||||||
split->getChannelView().tabHighlightRequested.disconnectAll();
|
split->getChannelView().tabHighlightRequested.disconnectAll();
|
||||||
|
|
||||||
split->getChannelView().tabHighlightColorRequested.disconnectAll();
|
|
||||||
|
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue