mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
name fixes
This commit is contained in:
parent
70f497d3bd
commit
7728f01916
|
@ -384,7 +384,7 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||||
ChannelView &channelViewSource,
|
const ChannelView &channelViewSource,
|
||||||
const MessagePtr &message)
|
const MessagePtr &message)
|
||||||
{
|
{
|
||||||
if (this->isSelected())
|
if (this->isSelected())
|
||||||
|
@ -404,25 +404,27 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto *splitContainer =
|
auto *visibleSplitContainer =
|
||||||
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
|
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
|
||||||
if (splitContainer != nullptr)
|
if (visibleSplitContainer != nullptr)
|
||||||
{
|
{
|
||||||
const auto &splits = splitContainer->getSplits();
|
const auto &visibleSplits = visibleSplitContainer->getSplits();
|
||||||
for (const auto &split : splits)
|
for (const auto &visibleSplit : visibleSplits)
|
||||||
{
|
{
|
||||||
auto filterIdsSource = channelViewSource.getFilterIds();
|
auto filterIdsSource = channelViewSource.getFilterIds();
|
||||||
auto filterIdsSplit = split->getChannelView().getFilterIds();
|
auto filterIdsSplit = visibleSplit->getChannelView().getFilterIds();
|
||||||
|
|
||||||
auto isSubset = []<typename T>(const QList<T> &sub, const QList<T> &super) {
|
auto isSubset = []<typename T>(const QList<T> &sub,
|
||||||
|
const QList<T> &super) {
|
||||||
return std::ranges::all_of(sub, [&super](const auto &subItem) {
|
return std::ranges::all_of(sub, [&super](const auto &subItem) {
|
||||||
return super.contains(subItem);
|
return super.contains(subItem);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (channelViewSource.underlyingChannel() == split->getChannel() &&
|
if (channelViewSource.underlyingChannel() ==
|
||||||
split->getChannelView().shouldIncludeMessage(message) &&
|
visibleSplit->getChannel() &&
|
||||||
isSubset(uniqueFilterIdsSource, uniqueFilterIdsSplit))
|
visibleSplit->getChannelView().shouldIncludeMessage(message) &&
|
||||||
|
isSubset(filterIdsSource, filterIdsSplit))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,8 @@ public:
|
||||||
bool isLive() const;
|
bool isLive() const;
|
||||||
|
|
||||||
void setHighlightState(HighlightState style);
|
void setHighlightState(HighlightState style);
|
||||||
void setHighlightState(HighlightState style, ChannelView &channelViewSource,
|
void setHighlightState(HighlightState style,
|
||||||
|
const ChannelView &channelViewSource,
|
||||||
const MessagePtr &message);
|
const MessagePtr &message);
|
||||||
HighlightState highlightState() const;
|
HighlightState highlightState() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue