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