mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix suggestions
This commit is contained in:
parent
f7dd6de872
commit
e827097c1c
|
@ -385,7 +385,7 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
||||||
|
|
||||||
void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||||
ChannelView &channelViewSource,
|
ChannelView &channelViewSource,
|
||||||
MessagePtr message)
|
const MessagePtr &message)
|
||||||
{
|
{
|
||||||
if (this->isSelected())
|
if (this->isSelected())
|
||||||
{
|
{
|
||||||
|
@ -404,7 +404,7 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto splitContainer =
|
auto *splitContainer =
|
||||||
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
|
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
|
||||||
if (splitContainer != nullptr)
|
if (splitContainer != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -419,14 +419,9 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||||
QSet(filterIdsSplit.cbegin(), filterIdsSplit.cend());
|
QSet(filterIdsSplit.cbegin(), filterIdsSplit.cend());
|
||||||
|
|
||||||
auto isSubset = []<typename T>(QSet<T> sub, QSet<T> super) {
|
auto isSubset = []<typename T>(QSet<T> sub, QSet<T> super) {
|
||||||
for (auto &&subItem : sub)
|
return std::ranges::none_of(sub, [&super](const auto &subItem) {
|
||||||
{
|
return !super.contains(subItem);
|
||||||
if (!super.contains(subItem))
|
});
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (channelViewSource.underlyingChannel() == split->getChannel() &&
|
if (channelViewSource.underlyingChannel() == split->getChannel() &&
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
|
|
||||||
void setHighlightState(HighlightState style);
|
void setHighlightState(HighlightState style);
|
||||||
void setHighlightState(HighlightState style, ChannelView &channelViewSource,
|
void setHighlightState(HighlightState style, ChannelView &channelViewSource,
|
||||||
MessagePtr message);
|
const MessagePtr &message);
|
||||||
HighlightState highlightState() const;
|
HighlightState highlightState() const;
|
||||||
|
|
||||||
void setHighlightsEnabled(const bool &newVal);
|
void setHighlightsEnabled(const bool &newVal);
|
||||||
|
|
|
@ -219,7 +219,7 @@ void SplitContainer::addSplit(Split *split)
|
||||||
if (this->tab_ != nullptr)
|
if (this->tab_ != nullptr)
|
||||||
{
|
{
|
||||||
this->tab_->setHighlightState(
|
this->tab_->setHighlightState(
|
||||||
state, channelView, message);
|
state, channelView, std::move(message));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue