Advanced channel filters (#1748)
Adds custom channel filters complete with their own mini-language. Filters can be created in settings, and applied by clicking the three dots to open the Split menu and selecting "Set filters".
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "controllers/filters/FilterSet.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/LimitedQueue.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
@@ -76,6 +77,10 @@ public:
|
||||
ChannelPtr channel();
|
||||
void setChannel(ChannelPtr channel_);
|
||||
|
||||
void setFilters(const QList<QUuid> &ids);
|
||||
const QList<QUuid> getFilterIds() const;
|
||||
FilterSetPtr getFilterSet() const;
|
||||
|
||||
ChannelPtr sourceChannel() const;
|
||||
void setSourceChannel(ChannelPtr sourceChannel);
|
||||
bool hasSourceChannel() const;
|
||||
@@ -178,11 +183,20 @@ private:
|
||||
LimitedQueueSnapshot<MessageLayoutPtr> snapshot_;
|
||||
|
||||
ChannelPtr channel_;
|
||||
ChannelPtr underlyingChannel_;
|
||||
ChannelPtr sourceChannel_;
|
||||
|
||||
Scrollbar *scrollBar_;
|
||||
EffectLabel *goToBottom_;
|
||||
|
||||
FilterSetPtr channelFilters_;
|
||||
|
||||
// Returns true if message should be included
|
||||
bool shouldIncludeMessage(const MessagePtr &m) const;
|
||||
|
||||
// Returns whether the scrollbar should have highlights
|
||||
bool showScrollbarHighlights() const;
|
||||
|
||||
// This variable can be used to decide whether or not we should render the
|
||||
// "Show latest messages" button
|
||||
bool showingLatestMessages_ = true;
|
||||
|
||||
Reference in New Issue
Block a user