mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
name fixes
This commit is contained in:
parent
70f497d3bd
commit
7728f01916
2 changed files with 14 additions and 11 deletions
|
@ -384,7 +384,7 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
|||
}
|
||||
|
||||
void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
||||
ChannelView &channelViewSource,
|
||||
const ChannelView &channelViewSource,
|
||||
const MessagePtr &message)
|
||||
{
|
||||
if (this->isSelected())
|
||||
|
@ -404,25 +404,27 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle,
|
|||
return;
|
||||
}
|
||||
|
||||
auto *splitContainer =
|
||||
auto *visibleSplitContainer =
|
||||
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
|
||||
if (splitContainer != nullptr)
|
||||
if (visibleSplitContainer != nullptr)
|
||||
{
|
||||
const auto &splits = splitContainer->getSplits();
|
||||
for (const auto &split : splits)
|
||||
const auto &visibleSplits = visibleSplitContainer->getSplits();
|
||||
for (const auto &visibleSplit : visibleSplits)
|
||||
{
|
||||
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 super.contains(subItem);
|
||||
});
|
||||
};
|
||||
|
||||
if (channelViewSource.underlyingChannel() == split->getChannel() &&
|
||||
split->getChannelView().shouldIncludeMessage(message) &&
|
||||
isSubset(uniqueFilterIdsSource, uniqueFilterIdsSplit))
|
||||
if (channelViewSource.underlyingChannel() ==
|
||||
visibleSplit->getChannel() &&
|
||||
visibleSplit->getChannelView().shouldIncludeMessage(message) &&
|
||||
isSubset(filterIdsSource, filterIdsSplit))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,8 @@ public:
|
|||
bool isLive() const;
|
||||
|
||||
void setHighlightState(HighlightState style);
|
||||
void setHighlightState(HighlightState style, ChannelView &channelViewSource,
|
||||
void setHighlightState(HighlightState style,
|
||||
const ChannelView &channelViewSource,
|
||||
const MessagePtr &message);
|
||||
HighlightState highlightState() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue