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:
kornes
2022-12-04 11:34:13 +00:00
committed by GitHub
parent 4fa214a38a
commit b7888749fe
19 changed files with 139 additions and 111 deletions
+8 -2
View File
@@ -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