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:
@@ -12,15 +12,21 @@ namespace chatterino {
|
||||
class LinkPredicate : public MessagePredicate
|
||||
{
|
||||
public:
|
||||
LinkPredicate();
|
||||
/**
|
||||
* @brief Create an LinkPredicate
|
||||
*
|
||||
* @param negate when set, excludes messages containing links from results
|
||||
*/
|
||||
LinkPredicate(bool negate);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Checks whether the message contains a link.
|
||||
*
|
||||
* @param message the message to check
|
||||
* @return true if the message contains a link, false otherwise
|
||||
*/
|
||||
bool appliesTo(const Message &message);
|
||||
bool appliesToImpl(const Message &message) override;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user