Commit Graph

94 Commits

Author SHA1 Message Date
nerix c5b0669812 refactor: turn Emotes into EmoteController (#6516)
* refactor: turn `Emotes` into `EmoteController`

* changelog

* why does clang-format do this???

* nit: remove unused include from EmoteController.hpp

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2025-10-04 10:05:27 +00:00
pajlada 8acca1c241 fix: don't indent inner namespaces (#6235) 2025-05-25 12:28:14 +02:00
Mm2PL 33a5419350 Forward declare some things to speed up compile (#6162)
* Forward declare NativeMessagingServer and use a unique_ptr

* Forward declare GenericListModel to save on unneeded includes of its
header
2025-05-18 15:30:02 +00:00
pajlada 6b968a199c fix some crashes, mostly related to network requests (#6187) 2025-05-17 14:22:56 +02:00
pajlada e86ecf5d0b refactor: move event api initializations to TwitchIrcServer (#6198) 2025-05-10 13:17:00 +00:00
pajlada 58859d439c fix(eventsub): connection race (#6017) 2025-03-02 15:48:08 +00:00
pajlada 0f8a29fdb9 feat: add initial experimental Twitch Eventsub support (#5837)
Co-authored-by: nerix <nerixdev@outlook.de>
2025-02-02 16:03:24 +00:00
nerix 694cc2dbff fix: close logging-channels when closing channels (#5592)
Co-authored-by: kornes <28986062+kornes@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-09-14 12:17:31 +02:00
pajlada 336536c761 chore: clean up some of the pronoun implementation (#5583) 2024-09-08 13:30:06 +02:00
Timo Zuccarello 9375bce555 feat: add setting for showing pronouns in user info popup (#5442)
This uses https://pr.alejo.io/

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2024-09-08 11:19:43 +02:00
nerix 820aa12af6 refactor: load Twitch emotes from Helix (#5239) 2024-09-01 11:22:54 +02:00
pajlada 627c735524 refactor: some Application & style things (#5561) 2024-08-25 15:33:07 +02:00
pajlada ac88730563 fix: remove deprecated Application::getTwitchAbstract (#5560) 2024-08-25 11:38:57 +00:00
pajlada 998920d244 Remove experimental IRC support (#5547) 2024-08-18 12:04:26 +00:00
pajlada 832e70e314 fix: only use IApplication::instance instead of Application::instance (#5540) 2024-08-11 14:03:47 +02:00
pajlada 74d65a345d fix: cleanly exit on shutdown (#5537)
Co-authored-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Co-authored-by: Nerixyz <nerixdev@outlook.de>
2024-08-10 14:24:25 +02:00
pajlada f0802af055 refactor: move seventv/bttv event apis to application (#5532) 2024-08-08 15:08:31 +02:00
pajlada 5deec1f02f chore: remove Singleton & replace getIApp with getApp (#5514) 2024-07-21 13:09:59 +00:00
pajlada f111b0f08d chore: unsingletonize SoundController (#5462) 2024-06-16 13:44:08 +00:00
pajlada c9a0691f53 chore: unsingletonize UserDataController (#5459)
The `user-data.json` file will save immediately on change, and on exit
(on dtor) if necessary. So we don't need to manually call save
2024-06-16 11:59:12 +00:00
pajlada 9b31246502 feat: allow timeout-related commands to be used in multiple channels (#5402)
This changes the behaviour of the following commands:
 - `/ban`
 - `/timeout`
 - `/untimeout`
 - `/unban`

All of those commands now accept one or more `--channel` parameters to override which channel the action should take place in.
The `--channel` parameter accepts a channel ID or channel name with the same syntax as the other "user targets" do (e.g. `id:11148817` or `pajlada`)

examples
Ban user in the chat you're typing in:  
`/ban weeb123`

Ban user in the chat you're typing in, with a reason specified:  
`/ban weeb123 the ban reason`

Ban user in a separate chat, with a reason specified:  
`/ban --channel pajlada weeb123 the ban reason`

Ban user in two separate chats, with a reason specified:  
`/ban --channel pajlada --channel id:117166826 weeb123 the ban reason`


Timeout user in the chat you're typing in:  
`/timeout weeb123`

Timeout user in the chat you're typing in, with a reason specified:  
`/timeout weeb123 10m the timeout reason`

Timeout user in a separate chat, with a reason specified:  
`/timeout --channel pajlada weeb123 10m the timeout reason`

Timeout user in two separate chats, with a reason specified:  
`/timeout --channel pajlada --channel id:117166826 weeb123 10m the timeout reason`


Unban user in the chat you're typing in:  
`/unban weeb123`

Unban user in a separate chat:  
`/unban --channel pajlada weeb123`

Unban user in two separate chats:  
`/unban --channel pajlada --channel id:117166826 weeb123`
2024-06-16 12:22:51 +02:00
pajlada b6dc5d9e03 chore: refactor TwitchIrcServer (#5421) 2024-06-01 12:56:40 +00:00
pajlada e7508332ff refactor: Fonts (#5228) 2024-03-10 13:27:08 +00:00
nerix c1fa51242f refactor: turn StreamerMode into a singleton(-like thing) (#5216) 2024-03-01 21:12:02 +01:00
nerix e130c48f76 refactor: Turn link-info into its own element and class (#5178) 2024-02-18 12:34:00 +00:00
pajlada 5628605de4 refactor: Move Emotes to Application (#5120) 2024-01-21 13:20:21 +00:00
pajlada 97702e0a1f refactor: make Application::emotes private (#5109) 2024-01-20 10:49:32 +00:00
pajlada 4380ef8c5f refactor: Remove most raw accesses into Application (#5104) 2024-01-19 17:59:55 +01:00
pajlada 326a402710 refactor: Make ChatterinoBadges less of a singleton (#5103) 2024-01-19 17:25:52 +01:00
nerix 4f2ca3b174 fix: assert for GUI thread in getters instead of get(I)App (#5102) 2024-01-18 19:50:57 +00: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 416806bb0a refactor: Twitch PubSub client (#5059)
* Remove unused `setAccountData` function

* Move PubSub out of TwitchIrcServer and into Application

* Add changelog entry

* fix: assert feedback

* Add PubSub::unlistenPrefix as per review suggestion

* Fix tests

* quit pubsub on exit

might conflict with exit removal, so can be reverted but this shows it's possible

* Don't manually call stop on clients, it's called when the connection is closed

* nit: rename `mainThread` to `thread`

* Join in a thread!!!!!!!!
2024-01-06 13:18:37 +01:00
pajlada 65b1ed312c refactor: Logging (chat logger) (#5058)
It's no longer a singleton

It's now a unique_ptr that dies together with the Application

* Add getChatLogger to EmptyApplication

* unrelated change: Access Application::instance statically

* fix logging init order

* Add changelog entry
2023-12-31 12:51:40 +00:00
pajlada d085ab578f refactor: Make Args less of a singleton (#5041)
This means it's no longer a singleton, and its lifetime is bound to our application.
This felt like a good small experiment to see how its changes would look
if we did this.
As a shortcut, `getApp` that is already a mega singleton keeps a
reference to Args, this means places that are a bit more difficult to
inject into call `getApp()->getArgs()` just like other things are
accessed.
2023-12-29 15:40:31 +01:00
nerix 25add89b14 feat: Add crash recovery on Windows (#5012) 2023-12-24 15:38:58 +01:00
pajlada a240797b68 Add support for sound backends & some miniaudio changes (#4978)
Miniaudio now runs everything in a separate audio thread - this uses boost::asio's io_context.
Our miniaudio implementation is now also much simplified - it does not use its own resource manager or device. This might end up being stupid if sounds don't work after changing output device or locking or w/e
I've made the sound controller into an interface, meaning we can support multiple sound backends in Chatterino. I've added a Null sound backend that disables all sound. A QMediaPlayer or QSoundEffect or Qt backend could be added.
Miniaudio might idle & disable the device now too, not sure

I've added some unrelated changes in the form of a new setting type, and a new setting page helper function for it, which will hopefully make adding new enum settings easier in the future.
This setting stores its value as a string instead of an int, and uses magic_enum to convert between that string value and its enum value.
2023-11-26 22:06:12 +01:00
nerix e8673fc52a fix: deadlock and use-after-free in tests (#4981)
* fix: use-after-free in settings

* refactor: put seventv api into a singleton

* chore: add changelog entry

* Add warning for when the 7TV load fails
2023-11-26 15:54:19 +00:00
Mm2PL fbc8aacabe Refactored the Image Uploader feature. (#4971)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-11-19 11:05:30 +00:00
pajlada 9f23c8562a Test filters context map & message builder (#4886) 2023-10-13 15:41:23 +00:00
pajlada d4558b5fe5 Fix all warnings from the cppcoreguidelines-pro-type-member-init clang-tidy check (#4426) 2023-09-09 11:11:19 +00:00
pajlada 76527073cf Ensure live status requests are always batched (#4713) 2023-07-02 13:52:15 +00:00
Mm2PL c6c884df70 Add an indicator in the title bar if Streamer Mode is active (#4410) 2023-05-27 10:38:25 +00:00
Daniel Sage 51f2c4d1c0 Add input completion test suite (#4644)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-21 10:10:49 +00:00
Mm2PL 5ba809804e Add basic lua scripting capabilities (#4341)
The scripting capabilities is locked behind a cmake flag, and is not enabled by default.

Co-authored-by: nerix <nerixdev@outlook.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-04-02 15:31:53 +02:00
pajlada 4958d08036 Change sound backend from Qt to miniaudio (#4334)
Thanks Greenlandicsmiley, Nerixyz, Yoitsu, and helmak for helping debug & test this

* Remove QMediaPlayer includes

* Prefer local path when generating the sound path

* Update changelog entry number

* Disable pitch & spatialization control
2023-01-29 10:36:25 +01:00
nerix 904749cf62 feat: Add Live Emote Updates for BTTV (#4147)
This feature is enabled by default and can be disabled in settings with the "Enable BTTV live emotes updates" setting.

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-01-21 14:06:55 +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 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
pajlada 1eabda8668 Initial backend test for user-based data/customizations (#4144)
Right now only support for colors and no real UX, idea is to test it & allow the idea to grow while figuring out the UX
2022-11-13 17:21:21 +00:00