mirror-chatterino2/src/widgets
Leon Richardt 720e5aa25f Improvements to Message Search (#1237)
* Ran clang-format

* Implement user-specific search in message history

This functionality was originally requested in #1236.

This commit changes the SearchPopup::performSearch method so that only
messages from specific users can be shown.

In order to filter for a specific user, enter their username with a
leading '@' in the search popup. You can also add an additional search
phrase which will also be considered in the search.

* Naive implementation for "from:" tags

Rebase later?

* Cleverer (?) version using Predicates

Commit adds two POC predicates: one for the author of messages, and one
for substring search in messages.

Problems/TODOs:
* Best way to register new predicates?
* Clean up tags (e.g. "from:") or not?
* Test combinations of different predicates

* Add a predicate to check for links in messages

* Remove a dumb TODO

* Rewrite SearchPopup::performSearch to be cleaner

* Ran clang-format on all files

* Remove TODO I missed earlier

* Forgot to run clang-format

peepoSadDank

* Re-use {}-initialization

Was accidentally removed when fixing earlier merge conflict.

* Does this fix line endings?

No diffs are shown locally, hopefully Git doesn't lie to me.

* Rename "predicates" directory to "search"

Resolving one conversation in the review of #1237.

* Use LinkParser in LinkPredicate

Resolving a conversation in the review of #1237.

* Predicates: Use unique_ptr instead of shared_ptr

Resolves a conversation in the review of #1237.

* Refactor of SearchPopup and AuthorPredicate

Resolving some points from the review in #1237.

* Moved parsing of comma-seperated values into AuthorPredicate
  constructor.
* Rewrite SearchPopup::parsePredicates as suggested.
* Deleted now redundant methods in SearchPopup.

* MessagePredicate::appliesTo now takes a Message&

... instead of a MessagePtr.

This resolves a conversation in the review of #1237.

* Run clang-format on two files I missed

* AuthorPredicate: Check for displayName & loginName

Resolving conversation on #1237.
2019-09-09 15:21:49 +02:00
..
dialogs Improvements to Message Search (#1237) 2019-09-09 15:21:49 +02:00
helper Improvements to Message Search (#1237) 2019-09-09 15:21:49 +02:00
settingspages Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
splits Fix merge conflicts 2019-09-08 22:58:17 +02:00
AccountSwitchPopup.cpp BaseWindow smol refactor 2019-09-08 21:45:46 +02:00
AccountSwitchPopup.hpp adjusted size of user switch popup 2019-09-08 12:43:12 +02:00
AccountSwitchWidget.cpp Update to latest settings library version 2018-11-03 13:00:07 +01:00
AccountSwitchWidget.hpp removed namespaces 2018-06-26 16:37:59 +02:00
AttachedWindow.cpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
AttachedWindow.hpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
Notebook.cpp Merge pull request #1179 from 23rd/patch-30-simplified-tab-hotkeys 2019-08-10 13:18:11 +02:00
Notebook.hpp update 2.1.0 2019-08-18 21:21:48 +02:00
Scrollbar.cpp Renamed variables to clear some warnings. 2019-05-10 22:18:05 +02:00
Scrollbar.hpp Clear highlights scrollbar with messages. 2018-09-02 03:02:12 +03:00
StreamView.cpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
StreamView.hpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
Window.cpp BaseWindow smol refactor 2019-09-08 21:45:46 +02:00
Window.hpp Added Preferences item in menu bar for OS X. 2019-06-10 12:43:37 +02:00