Commit Graph

102 Commits

Author SHA1 Message Date
pajlada 8acca1c241 fix: don't indent inner namespaces (#6235) 2025-05-25 12:28:14 +02:00
nerix 7f9b33051e fix: use non-capturing group for highlight boundaries (#5784) 2025-01-12 13:12:31 +00:00
pajlada 175afa8b16 refactor: make a single MessageBuilder (#5548) 2024-08-24 10:18:27 +00:00
pajlada cc8bd538b9 refactor: Move MessageFlag(s) to its own file (#5549) 2024-08-18 12:25:01 +02:00
nerix aed55ac1ba fix: replace defines with constexpr/const and use more absolute paths for includes (#5527)
bye bye nuuls
2024-08-03 10:00:58 +00:00
pajlada 5deec1f02f chore: remove Singleton & replace getIApp with getApp (#5514) 2024-07-21 13:09:59 +00:00
KleberPF c50791972d Add highlight color and show in mentions to automod messages (#5215) 2024-03-09 11:03:36 +00:00
pajlada 84a61fdad2 refactor: remove ColorProvider::setColor (#5112)
We now either:
1) Rely on the setting updating the color
2) Use ColorProvider::color to set the underlying color
2024-01-20 14:51:13 +00:00
pajlada 4380ef8c5f refactor: Remove most raw accesses into Application (#5104) 2024-01-19 17:59:55 +01:00
pajlada 11838c8e16 refactor: Move TwitchBadges to Application (#5096)
* refactor: Move TwitchBadges to Application

* refactor: Use named initializers

* refactor: Use `empty()` instead of `size() > 0`

* refactor: use emplace instead of push into the callback queue
2024-01-17 23:53:10 +01:00
pajlada 718696db53 refactor: Un-singletonize Paths & Updates (#5092) 2024-01-16 20:56:43 +00:00
pajlada 5b6675abb4 refactor: fix clang-tidy auto*, const&, and curly braces (#5083) 2024-01-14 17:54:52 +01:00
nerix 78a7ebb9f9 Improve color selection and display (#5057)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-01-06 20:52:29 +00:00
nerix 9a2c27d258 Allow customization of whisper colors in settings (#5053) 2023-12-29 20:52:35 +00:00
iProdigy eb12cfa50b feat: add sound and flash alert for automod caught messages (#5026)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-25 23:17:44 +00:00
pajlada 5c0219c245 refactor: Use override instead of virtual where possible (#4917) 2023-10-25 18:13:48 +02:00
pajlada fec45889a8 Replace boost::optional with std::optional (#4877) 2023-10-08 16:50:48 +00:00
pajlada 7cb04bf58b Remove BaseSettings & merge ConcurrentSettings (#4775) 2023-08-28 17:51:28 +02:00
Felanbird 381d5c4276 Change Elevated Messages to Hype Chats (#4766) 2023-08-14 17:19:20 +00:00
nerix 5d3e5d9312 Fix anonymous users being pinged by justinfan64537 (#4698)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-06-20 17:42:29 +00:00
nerix aff9342647 Add option to subscribe to and pin reply threads (#4680)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-06-17 15:41:52 +00:00
Auro d6ccab2cdf Added option to highlight your own messages (#3833)
* Removed magic numbers when checking rowIndex

* Swap from static ints to enum

* Referred enum members by enum name

* Fixed formatting

* Added highlight option for self messages

* Update CHANGELOG.md

* Made disabled by default

* Moved setting from Messages tab to Users tab

* Moved checks to HighlightController

* Set row index to 0

sillE silly me

* Update CHANGELOG.md

* Moved check outside of loop

* Improved naming and documentation on variables

* Fixed formatting

* Fix compile errors

* Update ColorProvider self message highlight color when it's changed

Use the ColorProvider self message highlight color instead of rolling
our own non-updating color

* Update changelog entry

* Remove unused `customColor` from user highlights builder

* Use explicit lambda capture

* Update comment for the color provider color

* HighlightModelHpp: Future-proof custom row enum B)

* Document UserHighlightModel color changes

* Update colorprovider comment

* Update enabled, show in mentions & color setting paths

* Rename settings from `selfMessagesHighlight` to `selfMessageHighlight`

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-01-30 11:40:50 +01:00
pajlada f933d9cdf2 Change the highlight order to prioritize Message highlights over User highlights (#4303) 2023-01-15 13:21:42 +00:00
nerix 1043f9f803 Remove Unnecessary Includes in Headers (#4275)
* refactor: remove unnecessary includes in headers

* fix: formatting

* chore: changelog

* fix: scrollbar

* fix: suggestions and old appbase remains

* fix: suggestion

* fix: missing Qt forward declarations

* fix: another qt include

* fix: includes for precompiled-headers=off

* Add missing `<memory>` includes

* Add missing `#pragma once`

* Fix tests

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-12-31 14:41:01 +00:00
pajlada a715b1ffff Clean up TwitchAccount emote stuff (#4243)
* Remove unused TwitchAccount FollowResult enum

* Remove unused TwitchEmoteSetResolverResponse struct

* Remove unused and unimplemented `getEmoteSetBatches` function definition

* Remove unused `loadEmoteSetData` and `staticEmoteSets` from
TwitchAccount

* Remove forward declaration of TwitchAccount in TwitchAccountManager

* Clean up IgnorePhrase includes

* add missing newline in pubsubmanager.cpp
2022-12-18 14:36:39 +00:00
nerix 2aa8af47e7 Clear up Highlight sound settings (#4194)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Closes https://github.com/Chatterino/chatterino2/issues/1540
2022-12-03 17:01:49 +01:00
pajlada 032f290767 Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories

In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:

    In ChatterSet.hpp, I changed lrucache to a <>include
    In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
    In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
    In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
    clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
nerix 4e2da540d2 refactor: Remove Leading Mention in Replies and Highlight Participated Threads (#4047) 2022-10-08 16:25:32 +02:00
Felanbird 7f93885518 Remove trailing whitespace from Usernames in User Highlights (#4051) 2022-10-06 22:42:41 +00:00
Felanbird 9816722b5e Add showInMentions option for Badge Highlights (#4034)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-10-02 11:25:10 +00:00
Felanbird 0ab59d44f0 Add Basic Elevated Message support (#4016) 2022-09-30 23:23:31 +00:00
pajlada 8bdfbf7b87 Allow non-message phrases to be highlighted by self (#3835)
* All non-phrase highlights can now trigger on messages from self

New state:
Allows self highlights: Subscription, Whisper, User, Badge
Does not allow self highlights: Message

* Add changelog entry

* fix PR number in changelog
2022-06-26 10:43:34 +00:00
Auro cdd949efd8 Moved highlight row index numbers to enum (#3829)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2022-06-25 09:14:19 +00:00
pajlada 9219647b6a Fix highlights not showing in mentions (#3801) 2022-06-06 15:36:53 +02:00
pajlada 7ccf60111d Overhaul highlight system (#3399)
Checks have been moved into a Controller allowing for easier tests.
2022-06-05 15:40:57 +00:00
Kasia 7d0023cf73 Corrected the way we parse comma-separated "list tags" in PRIVMSGs (#3771)
tl;dr: we now split by slash only its first occurrence instead of every occurrence.
2022-05-28 09:55:48 +00:00
Felanbird 8116c30261 Add some commented First Message code for consistency (#3370) 2021-11-28 12:19:08 +01:00
Felanbird b16fb5da7f Fix 'First Message' custom sound not persisting through restart (#3303) 2021-10-22 14:08:58 +02:00
Felanbird 3c9ee480c0 Fix being unable to disable 'First Message' highlights (#3293)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-10-20 13:03:59 +02:00
gempir 0ba7c0f3c5 Add highlights for first messages (#3267)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2021-10-02 12:17:24 +00:00
Daniel f6d9fb2aac Add ability to highlight messages based on user badges (#1704)
Co-authored-by: Paweł <zneix@zneix.eu>
Co-authored-by: 23rd <23rd@vivaldi.net>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-05-02 22:08:08 +00:00
Yoitsu 00ccdbc781 clang-tidy: use std::move where applicable (#2605)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-04-10 12:34:40 +00:00
Paweł d1a10d3c1f Fixed deprecated method QFlags::Zero (#2508)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-03-13 16:27:13 +01:00
dependabot[bot] 277289db55 Bump lib/serialize from 130ffc3 to 7d37cbf (#2418)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2021-02-17 23:57:37 +01:00
Leon Richardt 40da838a9d fix: showInMentions attribute is now serialized correctly (#2137)
This was an error introduced in ec94869. Instead of the
Qt::CheckStateRole, which stores the state represented in the table
view, the Qt::DisplayRole was used. As per [1], this always returns
`false` in our use case.

[1]: https://doc.qt.io/qt-5/qvariant.html#toBool
2020-10-26 10:06:09 +01:00
Leon Richardt ec94869480 Allow highlights to be excluded from /mentions (#2036) 2020-10-24 14:33:15 +02:00
fourtf f3225275ea changed channel point messages color 2020-08-22 16:48:40 +02:00
pajlada 0cbddf7e9b Fix/be respectful of special characters like exclamation marks in highlight phrases since they are also word boundaries (#1890)
* Add missing includes

We would normally have these included in another file already, or even
the precompiled headers, but having the files included here too makes
testing single parts easier.

* Modify the regex building of highlight phrases for non-regex phrases

For phrases like !test, the word boundary checking we did before was not
enough, so we now check for either a word boundary, a whitespace
character, or the line start/end.

* Add tests for ensuring I haven't fully broken the highlight system

* Add changelog entry
2020-08-22 15:37:03 +02:00
pajlada 3091842ddc Clarified that Redeemed Highlights are from Channel Points, not Bits (#1635) 2020-04-19 12:18:28 +02:00
fourtf 120f73db13 added additional checkbox for highlighted bits messages, fixes #1637 2020-04-18 20:05:05 +02:00