Commit graph

49 commits

Author SHA1 Message Date
nerix d3000ba597
feat: show warning before blocking followed channel (#5615) 2024-11-03 12:29:57 +00:00
nerix bbcd8c5eb2
fix: get rid of some more warnings (#5672) 2024-10-27 12:42:23 +00:00
iProdigy 18c4815ad7
feat: add shared chat badge (#5661) 2024-10-22 18:42:19 +02:00
nerix d9453313b3
test: add snapshot tests for MessageBuilder (#5598) 2024-10-13 10:38:10 +00:00
nerix 0db477665c
fix: don't initialize GIFTimer in tests (#5608) 2024-09-29 14:05:28 +02: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
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 3e510fd9e9
refactor: some more Application refactors (#5551) 2024-08-25 11:04:48 +00:00
pajlada 9f588b7406
fix: Fixed account switch not being saved if no other settings were changed (#5558) 2024-08-24 13:02:08 +00:00
pajlada 998920d244
Remove experimental IRC support (#5547) 2024-08-18 12:04:26 +00: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 9788d0f8f7
Added option to log streams by their ID, allowing for easier "per-stream" log analyzing (#5507) 2024-07-14 09:45:21 +00:00
iProdigy c01bfcfffe
feat: add /warn command (#5474) 2024-06-22 10:36:29 +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
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 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