message shown based inclusion

This commit is contained in:
unknown 2024-10-20 18:04:24 +02:00
parent fe51ba85e7
commit b0e3a41312

View file

@ -628,20 +628,10 @@ bool NotebookTab::shouldMessageHighlight(const ChannelView &channelViewSource,
const auto &visibleSplits = visibleSplitContainer->getSplits(); const auto &visibleSplits = visibleSplitContainer->getSplits();
for (const auto &visibleSplit : visibleSplits) for (const auto &visibleSplit : visibleSplits)
{ {
auto filterIdsSource = channelViewSource.getFilterIds();
auto filterIdsSplit = visibleSplit->getChannelView().getFilterIds();
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() == if (channelViewSource.underlyingChannel() ==
visibleSplit->getChannel() && visibleSplit->getChannel() &&
visibleSplit->getChannelView().shouldIncludeMessage(message) && visibleSplit->getChannelView().shouldIncludeMessage(message) &&
isSubset(filterIdsSource, filterIdsSplit)) channelViewSource.shouldIncludeMessage(message))
{ {
// all filters in unvisible source are found in visible split // all filters in unvisible source are found in visible split
// therefore the unvisible split is more generic than the visible one // therefore the unvisible split is more generic than the visible one