Commit graph

1937 commits

Author SHA1 Message Date
nerix c65ebd26bd
fix: non-native drag on Windows (#5051) 2023-12-29 15:10:56 +01:00
nerix d84779f127
fix: some buttons triggering when releasing mouse outside (#5052)
Examples of buttons fixed with this: Usercard profile picture & split header mod mode button
2023-12-29 14:20:07 +01:00
nerix d0d240136e
fix: Add check for tall messages (#5045) 2023-12-27 16:50:04 +01:00
nerix 9612eac966
perf: Only update regions with animated elements (#5043) 2023-12-27 01:12:14 +01: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
nerix 1006bf955a
perf: skip update from GIF timer if no animated elements are shown (#5042) 2023-12-25 19:04:46 +00:00
nerix 485fc5cdb4
fix: Tooltip parenting on Windows (#5040)
Fixes #5019
2023-12-25 17:17:25 +00:00
nerix 25add89b14
feat: Add crash recovery on Windows (#5012) 2023-12-24 15:38:58 +01:00
nerix d105a68dba
Allow ChannelViews without a Split (#4747) 2023-12-17 21:49:37 +01:00
pajlada 0395b692e4
fix: ReplyThreadPopup now requires a split as its parent (#5036)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
2023-12-17 13:16:40 +00:00
pajlada aa11a24163
fix: UserInfoPopup now requires a split as its parent (#5034)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
2023-12-17 11:53:06 +00:00
Herman Stornes b78b57b454
Fixes to ctrl+backspace behavior (#5013) 2023-12-16 13:40:05 +00:00
nerix 66f4480371
fix: Fixed some compiler warnings (#5028)
* fix(C4101): unreferenced local variable

* fix(C4189): variable initialized but not referenced

* fix(C4305): narrowing from double to float

* fix(C4457): declaration hiding function parameter

* fix(C4456): shadowing declaration

* fix(C4996): remove deprecations

* chore: add changelog entry

* fix: Remove more unused variables

* fix: removed unused lambda captures

* Update changelog entry

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-16 11:24:28 +00:00
Mm2PL fd4cac2c2c
Add a new completion API for experimental plugins feature. (#5000)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-10 13:41:05 +00:00
pajlada e4258160cd
Fixed "Yes, don't ask again" image uploader prompt not working on macOS (#5011) 2023-12-10 13:28:31 +01:00
Mm2PL 401e097d62
Hide the Usercard button in the User Info Popup in special channels (#4972) 2023-12-09 12:21:00 +00:00
smc fec8f8c49f
Fix missing parent of tooltips for Wayland (#4998)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-09 11:28:33 +00:00
Mm2PL c3d3903b6f
feat: add --safe-mode command line option (#4985)
This ensures the settings button isn't hidden, and disables plugins from being loaded to make sure the user can always recover from messing things up
2023-12-05 17:37:42 +00:00
iProdigy 44abe6b487
feat: add channel for messages caught by AutoMod (#4986)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-03 22:07:30 +00:00
nerix 812186dc4c
Return correct hit-test values for title bar buttons on Windows (#4994)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-12-03 13:41:33 +00:00
nerix c4c94473ae
Do bounds-checking on more windows (#4797)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-12-02 12:56:03 +01: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
Mm2PL 6d02bb7304
Make emote completion a lot smarter (#4987) 2023-11-28 10:06:35 +00: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
pajlada 5b741a8eb6
refactor: Remove Emoji's EmojiMap with a vector (#4980) 2023-11-26 18:17:58 +00:00
Mm2PL 1a685d7bd0
Finish renaming Viewer list to Chatter list (#4974) 2023-11-20 17:59:04 +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
nerix 6faf63c5c4
refactor: Remove Outcome from network requests (#4959) 2023-11-12 14:51:51 +01:00
pajlada 95620e6e10
fix: Split input sometimes not accepting focus (#4958) 2023-11-11 10:58:20 +00:00
Mm2PL f943f70634
Add support for opening usercards by ID (#4934)
Co-authored-by: nerix <nerixdev@outlook.de>
2023-11-06 20:42:24 +01:00
iProdigy 5209e47df1
Improve reply popup after thread update (#4923)
Co-authored-by: nerix <nero.9@hotmail.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-11-05 16:25:26 +00:00
nerix 7d145e3577
Disable clickable sections in tables (#4913) 2023-11-04 18:42:13 +00:00
nerix 5325c7b826
Fix tooltips appearing too large and/or away from the cursor (#4920) 2023-11-04 18:13:34 +00:00
pajlada f8b239899a
refactor: KeyboardSettingsPage (#4937) 2023-11-04 10:56:31 +00:00
pajlada 4e63a1b6ec
refactor: Message (#4915)
* Helix: Remove static from anon namespace

* Message: Remove empty anon namespace

* Message: Remove else after return

* Message: Avoid repeating type in return

* Message: Remove ScrollbarHighlight alias

* Message: Remove unused includes

* AttachedWindow: Remove unused include
2023-11-02 14:48:12 +00:00
Mm2PL 03b32bffc8
Bugfix: Fixed a crash when clicking More messages below button in a usercard and closing it quickly. (#4933) 2023-11-02 12:12:52 +00:00
pajlada 56346874e1
ci: Use clang-format 16 (#4929) 2023-10-31 17:24:47 +00:00
pajlada 7efe58cca9
refactor: ChannelView (#4926)
Co-authored-by: nerix <nerixdev@outlook.de>
2023-10-31 14:54:14 +01:00
nerix c811e2d991
refactor: Change lifetime of context menus (#4924) 2023-10-29 19:24:38 +00:00
nerix 7ecbfa0cdb
refactor: debug count and popup (#4921)
* Moved implementation of the methods to the `cpp` file.
* Added `DebugCount::Flag(s)` and `DebugCount::configure(name, flags)`.
* Moved from `QMap` to `std::map` (order is important here).
* Used `QStringBuilder` for concatenations.
* Used `QLocale` for formatting (adds separators).
* Added `DebugCount::Flag::DataSize` for data sizes in bytes (and fixed language to English).
* Used `DataSize` for image sizes (maybe this should be moved somewhere else?).
* Added copy button to popup.
* Fixed Image usage reporting being eight times too large (could be another PR, but honestly it's four characters).
2023-10-28 21:17:32 +02:00
pajlada 5c0219c245
refactor: Use override instead of virtual where possible (#4917) 2023-10-25 18:13:48 +02:00
kornes 12808d3154
refactor: simplify double click selection (#4898) 2023-10-17 13:38:38 +02:00
kornes ccaedc3987
perf: reduce repaints amount caused by selection (#4889)
Co-authored-by: nerix <nero.9@hotmail.de>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-10-13 17:19:52 +00:00
Daniel Sage 653a14c76b
fix: Don't use QCompleter prefix filter (#4855)
* Invalidate tab completion model when settings change

* Remove true culprit

* Update CHANGELOG.md

* Remove QCompleter setFilterMode call

---------

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
2023-10-13 11:22:48 +02:00
pajlada fec45889a8
Replace boost::optional with std::optional (#4877) 2023-10-08 16:50:48 +00:00
nerix 4db93bf1da
Adjust DontFocus window flags on Windows and macOS (#4876) 2023-10-08 00:03:14 +02:00
nerix 752825793a
Ignore invisible widgets when hit testing (#4873)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
2023-10-06 21:26:25 +00:00
nerix 2fc7fdd91a
Fix empty page added when showing OOB dialog (#4849) 2023-10-01 06:40:34 +00:00
nerix 916427a612
Fix flickering when running with Direct2D (#4851) 2023-10-01 07:13:37 +02:00
nerix 783c7530f3
Allow any window to be bounds-checked (#4802)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-09-24 13:32:43 +00:00
Daniel Sage 37009e8e6b
Consolidate input completion code in preparation for advanced completion strategies (#4639)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-09-24 12:17:17 +00:00
nerix 6860c7007e
Fix selection rendering (#4830)
The rendering of selections was not aligned to the actual selection that took place for newlines at the end of messages, if they were the only part that was selected of that message.

In addition to that fix, we've already refactored the MessageLayoutContainer to try to make it a little bit more sane to work with in the future.

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-09-23 15:09:56 +00:00
Felanbird 89b915bad1
Mention filters in the note for features that nicknames don't work with (#4826) 2023-09-18 08:52:08 +02:00
pajlada e6df652a4f
fix: QuickSwitcherPopup now pops up in the selected window (#4819) 2023-09-17 21:52:17 +00:00
nerix 3265df7661
Fixed too much text being copied when copying chat messages (#4812)
* fix: selection copying too much

* chore: add changelog entry

* Update changelog entry

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-09-17 12:37:02 +00:00
nerix dc62e8248b
Add (invisible) resize handle to frameless usercards and reply threads (#4795)
* feat: add resize handle to usercards&reply threads

* Add changelog entry

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-09-17 11:27:20 +00:00
Mm2PL d752ce86fd
Add WindowManager::getLastSelectedWindow() to replace getMainWindow() (#4816)
1. No longer can return a nullptr if no window was ever focused
  2. When closing a window, it will no longer return an invalid pointer
2023-09-16 20:53:44 +00:00
qooq69 38c994be49
Fixed Usercard Popup not floating on tiling WMs on Linux (#3511) 2023-09-16 22:15:01 +02:00
pajlada 8fe3af3522
Fix signal connection nodiscard warnings (#4818) 2023-09-16 11:52:51 +00:00
nerix 2d5f078306
Style account switcher to match the current theme (#4817) 2023-09-15 18:44:36 +02:00
nerix 337b043bc3
Fix input in reply thread popup losing focus when dragging (#4815) 2023-09-13 20:38:32 +00:00
nerix 283ede86ad
Only layout visible ChannelViews (#4811) 2023-09-10 17:08:13 +02:00
Daniel Sage 1b9ee939bb
Select correct notebook tab after closing while filtered (#4770) 2023-09-10 10:38:59 +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 d4558b5fe5
Fix all warnings from the cppcoreguidelines-pro-type-member-init clang-tidy check (#4426) 2023-09-09 11:11:19 +00:00
nerix af4233850d
Remove offset logic from BaseWindow::moveTo (#4798)
It's now up to each window to offset its coordinates themselves (which is good 👍 )
2023-08-28 16:38:41 +00:00
pajlada 7cb04bf58b
Remove BaseSettings & merge ConcurrentSettings (#4775) 2023-08-28 17:51:28 +02:00
Mm2PL 1e35391075
Hide AutoMod term management messages in Streamer Mode. (#4758)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-08-12 12:16:30 -04:00
Mm2PL ec0d77643f
Remove USEWEBENGINE (#4757)
This code has been sitting behind a define since 2018 (de3a490). I'm not opposed to this code coming back however in this state, it feels better to remove it.
2023-08-07 18:24:17 +00:00
Mm2PL 59160c5d04
Minor: Add missing hotkey Action for Open Player in Browser. (#4756) 2023-08-07 13:41:32 +00:00
Mm2PL 168f346c81
Remove restriction on Go To Message on system messages from search (#4614)
* Remove restriction on go to message on system messages

Fixes #4608

* changelog

* Change the changelog entry from a bugfix to minor

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-08-05 16:36:49 +00:00
pajlada 9e2eb0dd29
Fix tooltip & popup positioning (#4740)
* Fix tooltip & popup positioning

This tries to ensure the tooltip & popups are created on the correct
monitor

* Add changelog entry

* Clean up debug output

* Use the full frame geometry to figure out screen bound movements

* Remove the now-unused `setStayInScreenRect` function

* Change the UserInfoPopup offset to be based on its width & height
instead

* Remove more debug output
2023-08-05 11:22:37 +00:00
Mm2PL b98be3b0f3
Fixed right-clicking mentions no longer working. (#4751)
* fix up rightclicking mentions

* changelog

* Merge changelog entries other PR was merged after 2.4.4
2023-08-05 11:17:34 +00:00
Mm2PL 89323ffa1f
Fixed tab completion rarely completing the wrong word. (#4735)
* Fixed tab completion rarely completing the wrong word.

Fixes: #3101

* Use QSignalBlocker instead of janky bool, add comment about hidden logic

* copypasteo
2023-07-31 21:34:53 +00:00
nerix 71594ad0d8
Remove getApp and getSettings calls from Message-Rendering (#4535)
* refactor: remove singletons from message rendering

* chore: add changelog entry

* Disable the `cppcoreguidelines-avoid-const-or-ref-data-members` clang-tidy check

* auto *app

* Selection is a struct, not a class

* Use ChannelView's `signalHolder_` instead of `channelConnections_`

* Remove `applySettings` step, instead just connect & set each setting individually

* rename & constify some context values

* Handle empty "last message color" setting value better (as it was
        originally in this pr before I removed that change :-)

* unrelated mini refactor cleanup

* let painSelection handle size_t instead of int

* Add some more comments to the MessageLayoutContext structs

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-07-30 12:52:39 +00:00
nerix 378aee7ab1
Refactor Native Messages (#4738)
* refactor: move ipc queue into its own class

* refactor: move windows.h related functions to AW

* refactor: make NM-Client methods static

* refactor: json access

* refactor: use struct initializer

* refactor: move `handleMessage` to anon-namespace

* refactor: clean-up includes

* refactor: move action handler to functions

* refactor: cleanup `handleSelect`

* fix: cleanup clang-tidy warnings

* chore: simplify json

* revert: keep handlers as methods

This is more readable and extensible.

* fix: typo

* fix: namespace

* fix: rename define

* refactor: `IpcQueue` to be simpler

* fix: rename cmake option

* fix: use variant when constructing

* fix: make it a ref

* fix: its a pair now
2023-07-30 11:14:58 +00:00
Brian c496a68633
Fix: Incorrect tab focus in reply threads (#4739)
* Fix: Incorrect tab focus in reply threads
fixes #4737

* Append to changelog

---------

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
2023-07-29 17:06:12 +00:00
Abhinav Neelam 9cb59f753f
focus message input when selecting emotes in emote popup (#4719)
* focus input when selecting emotes in emote popup

* changelog

---------

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-07-29 13:16:19 +00:00
SputNikPlop 7079729591
fix: change viewer list to chatter list (#4732)
* fix: change viewer list to chatter list

* fix: enter changelog entry
2023-07-29 10:47:24 +00:00
nerix 33fa3e0a97
Use New 7TV Cosmetics System (#4512)
* feat(seventv): use new cosmetics system

* chore: add changelog entry

* fix: old `clang-format`

* fix: small suggestions pt1

* refactor: add 7tv api wrapper

* fix: small clang-tidy things

* fix: remove unused constants

* fix: old clangtidy

* refactor: rename

* fix: increase interval to 60s

* fix: newline

* fix: Twitch

* docs: add comment

* fix: remove v2 badges endpoint

* fix: deadlock

This is actually really sad.

* fix: remove api entry

* fix: old clang-format

* Sort functions in SeventvBadges.hpp/cpp

* Remove unused vector include

* Add comments to SeventvBadges.hpp functions

* Rename `addBadge` to `registerBadge`

* fix: cleanup eventloop

* ci(test): add timeout

---------

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-07-29 09:49:44 +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 a440f0261a
Fix crash that could occur when closing a split before its display name was updated (#4731)
This fixes a crash that could occur when closing a split before the
display name had a chance to update

The reason I found this was because the LiveController change I made
updated display names more regularly

Additionally, we now make sure to not send duplicate `displayNameUpdated` signals
upon each request for channels with CJK characters in their display name

* Default-initialize the `actualDisplayName` with the user's login name to not send an initial display name update if the display name is the same casing as the login name
2023-07-23 10:11:57 +00:00
Mm2PL ae8b2adcdd
Add accelerators to the right click menu for messages (#4705) 2023-07-22 12:54:48 +02:00
pajlada 76527073cf
Ensure live status requests are always batched (#4713) 2023-07-02 13:52:15 +00:00
Mm2PL f915eab1a2
Add "pin" action to usercards and reply threads (#4692) 2023-07-01 16:38:55 +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
Mm2PL 2f272b37ca
Allow for customizing the behavior of Right Clicking of usernames. (#4622)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-07-01 11:03:16 +00:00
pajlada af34bf6246
Fix streamer mode button being always visible on Windows (#4690)
Fixes #4682
2023-06-18 12:33:44 +00:00
Andrew Opalach 0e60ca10d0
Fix smooth scrolling when ChannelView is full (#4501)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-06-18 12:09:11 +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
Daniel Sage 4361790fbd
Add setting to only show tabs with live channels (#4358)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-06-11 11:34:28 +02:00
nerix 839ba60fd8
Respect Theme in Input Completion & Quick Switcher (#4671) 2023-06-10 12:38:23 +00:00
nerix 65a14fb95b
Fix crash resulting from a mutex deadlock when switching users (#4675) 2023-06-10 11:40:30 +00:00
nerix 335dff53af
Don't add QLayouts to QWidgets that already have one (#4672) 2023-06-10 10:55:47 +00:00
Arne 6681ed5bfb
Remove QObjectRef in favor of QPointer (#4666)
* replace usage of QObjectRef with QPointer

* delete QObjectRef class

* inlucde QPointer header

* Add changelog entry

* use isNull() instead of ! data()

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-06-04 11:24:04 +00:00
Wissididom e803b6de95
Remove duplicate Fluent icons license (#4665) 2023-06-04 11:40:11 +02:00
chrrs bf4148a370
Consider nicknames when searching for messages (#4663)
Co-authored-by: pajlada <rasmus.karlsson+github@pajlada.com>
2023-05-31 19:38:17 +00:00
pajlada e9432d3b65
Clean up GenericListModel (#4661)
Co-authored-by: Daniel Sage <sagedanielr@gmail.com>
2023-05-29 16:37:55 +02:00
Mm2PL c7b22939d5
Improve editing of hotkeys (#4628)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-27 14:04:30 +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