feat: Allow negation of search predicates (#4207)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com> closes https://github.com/Chatterino/chatterino2/issues/3998
This commit is contained in:
@@ -16,10 +16,12 @@ public:
|
||||
/**
|
||||
* @brief Create a ChannelPredicate with a list of channels to search for.
|
||||
*
|
||||
* @param channels a list of channel names that a message should be sent in
|
||||
* @param channels one or more comma-separated channel names that a message should be sent in
|
||||
* @param negate when set, excludes list of channel names from results
|
||||
*/
|
||||
ChannelPredicate(const QStringList &channels);
|
||||
ChannelPredicate(const QString &channels, bool negate);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Checks whether the message was sent in any of the channels passed
|
||||
* in the constructor.
|
||||
@@ -28,7 +30,7 @@ public:
|
||||
* @return true if the message was sent in one of the specified channels,
|
||||
* false otherwise
|
||||
*/
|
||||
bool appliesTo(const Message &message);
|
||||
bool appliesToImpl(const Message &message) override;
|
||||
|
||||
private:
|
||||
/// Holds the channel names that will be searched for
|
||||
|
||||
Reference in New Issue
Block a user