Commit graph

32 commits

Author SHA1 Message Date
JakeRYW 25284fc703
Improved error messaging for Update Channel API (#5429) 2024-06-09 11:15:25 +00: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 0cfd25ce8e
feat: Send messages using Helix API (#5200) 2024-02-25 14:45:55 +01:00
nerix e130c48f76
refactor: Turn link-info into its own element and class (#5178) 2024-02-18 12:34:00 +00:00
pajlada 32d269dffc
feat: add the ability to unit test some aspects of SplitInput (#5179) 2024-02-17 12:26:54 +00:00
pajlada fe1e498a5f
chore: Run Ubuntu tests in Docker (#5170)
Co-authored-by: Wissididom <30803034+Wissididom@users.noreply.github.com>
2024-02-11 19:11:30 +01:00
pajlada 5628605de4
refactor: Move Emotes to Application (#5120) 2024-01-21 13:20:21 +00:00
pajlada 326a402710
refactor: Make ChatterinoBadges less of a singleton (#5103) 2024-01-19 17:25:52 +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 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 99b537ffd9
Add some tests for NotebookTab (#5070)
* EmptyApplication: Add asserts to rest of getters (except for getSeventvAPI)

* Theme: make getTheme call getIApp()->getThemes() instead

this allows it to be used in tests
realistically this should be deprecated & users of it should just call
getIApp()->getThemes() directly

* Use getIApp() instead of getApp() in a few places
2024-01-06 11:42:45 +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 269e7a07b4
chore: Unify .clang-format file (#5037)
* chore: Unify all .clang-format files in the root dir

* Update `scripts/check-format.sh` to include all source dirs

* Add changelog entry
2023-12-17 13:50:42 +00:00
pajlada e327ed4166
Update magic_enum from v0.9.3 to v0.9.5 (#4992)
* Fix include path for magic enum
* Update .clang-format to ensure magic enum is caught as a third party library
2023-12-01 15:03:04 +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 fec45889a8
Replace boost::optional with std::optional (#4877) 2023-10-08 16:50:48 +00:00
pajlada 813d96867b
Migrate to the new Get Channel Followers Helix endpoint, fixing follower count not showing up in usercards (#4809) 2023-09-09 12:51:45 +00:00
pajlada 3f7671000a
Fix memory leaks & data races in tests (#4772)
* Add a few pre-made sanitizer suppressions

* Test Sanitization: Fix threading issues

* Test Sanitization: Allow deletion of PubSub

We still don't delete it in main code, but this allows us to try
deleting it in tests.

* Test Sanitization: Fix some memory leaks

* fix gtest clang-tidy warning

* const emojis test :-)
2023-08-27 12:07:46 +00:00
nerix fca57696bb
Increase max number of blocked users loaded from 100 to 1,000 (#4721)
Also includes a little refactor of how the requests are made & how the blocked users are stored
2023-07-23 11:26:12 +00:00
pajlada 76527073cf
Ensure live status requests are always batched (#4713) 2023-07-02 13:52:15 +00:00
pajlada d2f1516818
Fix crash that could occur if closing the usercard quickly after blocking (#4711)
* Specifically, this adds a caller to the network request, which makes the
success or failure callback not fire.
This has the unintended consequence of the block list not reloading if
the usercard is closed, but it's not a big concern.

* Add unrelated `-DUSE_ALTERNATE_LINKER` cmake option

From 0517d99b46/CMakeLists.txt (L87-L103)
2023-07-01 12:01:47 +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
olafyang 21d4b2cacc
add "/shoutout" command (#4638)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-20 16:32:06 +00:00
pajlada e1a6c24cf3
Move mocks to their own interface (#4645) 2023-05-20 10:54:50 +00:00