* fixed SearchWindow memory leak
* Update CHANGELOG.md
* added DebugCount for BaseWindow
* [Bug Fix] Color of second user highlight cannot be set (#1898)
* Highlighting: Fix bug preventing user highlight from being set
Before this commit, only the row of a clicked cell was checked, but not
the tab it was clicked in.
Since the "Whispers" row is the second row in the "Messages" tab on the
highlighting page, the color picker was not opened for the second entry
in the "Users" tab either. This commit fixes the bug by also checking
tab the cell was clicked in.
* Update CHANGELOG.md
* Emote Popup Improvements (#1895)
* Put exact matching emotes first
* Close GenericListView on Escape press
* smol fix
* fixed emote input when not in the first char
* fixes#1902
* closes#1904
Co-authored-by: Leon Richardt <leon.richardt@gmail.com>
Co-authored-by: Daniel <24928223+dnsge@users.noreply.github.com>
This feature is off by default and can be enabled in the settings with the "Show link thumbnail" setting. This feature also requires the "Show link info when hovering" setting to be enabled.
thumbnails support is only there for direct image links, twitch clips, and youtube links. can be expanded in the future in the /api repo
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* Better Highlights: Fix wrong color for migrated phrases
Prior to this commit, no default color was set when an "old" highlight
phrase (one added prior to #1320 / 5957551) was deserialized. This
commit makes highlight phrases uses the default self-highlight color for
these situations. This approach is reasonably sensible since that color
is also similar to the old highlight color.
Fixes#1565.
* Update default self-highlight color
The new default color was suggested in [1] by @RAnders00. Refer to the
link for further information.
[1]: https://github.com/Chatterino/chatterino2/issues/1565#issuecomment-590441625
* Theme: Remove highlight color
As highlight color is independent of the selected theme now, the member
has been removed from the `Theme` singleton. Instead, the fallback theme
color is defined in `HighlightPhrase` now.
Uses of `themes->messages.backgrounds.highlighted` have been replaced
with `HighlightPhrase::FALLBACK_COLOR` accordingly.
* Update src/controllers/highlights/HighlightPhrase.hpp
attempt to just remove constexpr
Co-Authored-By: Ruben Anders <ruben.anders@robotty.de>
* Initialize FALLBACK_COLOR outside header file
* Rename FALLBACK_COLOR to FALLBACK_HIGHLIGHT_COLOR
In preparation for the next commit introducing a new variable.
* Moved subscription highlight color into HighlightPhrase
* Use actual subscription color as a fallback
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
Co-authored-by: Ruben Anders <ruben.anders@robotty.de>
There's a document in src/providers/twitch/api which describes how we interact with the Twitch API.
Keeping this up to date might be a healthy way for us to ensure we keep using the right APIs for the right job.
Fixes#1546
This change introduces a "window timer" that runs every 100ms that we
use to update the pixmap if necessary, since there is no signal for "let
me know when this image is done loading".
* Support for user-defined sounds and colors
* Make color & sound columns selectable
* Add custom row for subscription highlights
* Add subscriptions to custom highlights and centrally manage highlight colors
* Dynamically update message highlight colors
* 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.
* Make emote tab completion search for substrings
Previously, tab completion only searched for emotes that start
with the current prefix under the cursor. This commit makes tab
completion look for the current prefix as a substring in any position,
not just the start.
Examples:
* In forsen's channel, tabbing on "pls" will cycle through "DonaldPls", "forsenPls",
"GachiPls", "nyanPls" and "SourPls".
* As a forsen subscriber, tabbing on "sen1" will complete to "forsen1".
* As a pajlada subscriber, tabbing on "shrug" will cycle through
"pajaShrugL" and "pajaShrugR". (Unless you are in a channel with
more "shrug" emotes, of course.)
* Add a setting for prefix and substring completion
This commit adds a setting under the "Miscellaneous" section to allow
user to choose whether they want prefix-only or substring emote
completion.
The QCompleter filter mode and `addString` function are now chosen
according to the user's setting.
* Improve description of emote completion setting
Also reintroduce a blank line that went missing.
"Stack" is the default behaviour, it will search 20 messages up and 5
seconds back in time to stack the timeout.
"Stack sparingly" will try to do the same, but only if the user has not
typed a message inbetween the this and the last timeout.
Fixes#1157