* feat: show chat badges on suspicious user messages
* feat: display emotes in suspicious user messages
* feat: add search filters for suspicious messages
* chore: update changelog
* refactor: resolve initial nits
* fix: finish adding new filter identifier
* Comment the new message flags
* Add a list of known issues to low trust update messages
* fix: Keep shared-pointerness of the channel
Without this change, we would have the possibility of using the
TwitchChannel after the Channel itself has gone out of scope, albeit not
realistically since we just post this to a thread and parse it - there's
no networking or big delays involved. but this shows the intent better
---------
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* 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!!!!!!!!
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
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.
The `nightly` branch of Chatterino on Flathub will no longer be updated due to changes in Flathub rules. Nightly builds will instead be published in the `flathub-beta` repository. The `.flatpakref` file has been updated to point to the new location.
See also: https://github.com/flathub/flathub/issues/4767
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.
Use full path in includes
Sort includes
Move anon namespace out of chatterino namespace
Use auto * where possible
Disable convert-member-function-to-static check for all member functions
Don't use else after return
Removed empty constructor
Replace use of `boost::variant` with `std::variant`
Co-authored-by: nerix <nerixdev@outlook.de>
If we also have a subscriber emote set for a channel, then don't treat
a follower emote set as local to that channel.
Co-authored-by: iProdigy <8106344+iProdigy@users.noreply.github.com>
* 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).
* Fixes a bug where avatars weren't loaded on fresh installations of Chatterino.
* Avatars now update every two weeks.
* Removes misleading `DownlaodManager` (now part of `Toasts.cpp`).
* Refactors usage of WinToast to be easier to read.
* Added version to AUMI.
* Removes manual `QString` → `std::wstring` conversions.
* Removes uses of implicit ASCII casts in `Toasts.cpp`, meaning it can be compiled with `QT_NO_CAST_FROM_ASCII`.
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>
* Tests: Fix InputCompletion tests in Qt6
This is achieved by not checking exact order for certain completion tests
* Tests: Use Ubuntu 22.04 for all tests
This allows us to be a bit more loose and use more C++20 features in
tests
* Update dockerfiles
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.
* 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>
* Split log line generation from message search text
* changelog
* remove empty space at the beginning of usernames
* Move changelog entry
---------
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* feat: build installer in CI
Co-authored-by: 8thony <114905842+8thony@users.noreply.github.com>
* fix: use inno-setup from PATH
* fix: only match `v*` tags
* fix: don't add to release
* fix: only run on master
---------
Co-authored-by: 8thony <114905842+8thony@users.noreply.github.com>
* 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
* Fixed tab completion rarely completing the wrong word.
Fixes: #3101
* Use QSignalBlocker instead of janky bool, add comment about hidden logic
* copypasteo
* feat: more hype chat
* Add `std::chrono::seconds` overload to formatTime
* Move & rename it to HypeChat + some other mini things
* Add changelog entry
* fix formattime test
---------
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* 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>
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
* 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)
`/debug-force-image-gc` will force garbage collection on all unused images
`/debug-force-image-unload` will force unload all images
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Available test channels:
- `$$$` - Fill up scrollback (1000 messages), then add a new message every 500ms
- `$$$:e` - Add a new message every 500ms
- `$$$$` - Fill up scrollback (1000 messages), then add a new message every 250ms
- `$$$$:e` - Add a new message every 250ms
- `$$$$$` - Fill up scrollback (1000 messages), then add a new message every 100ms
- `$$$$$:e` - Add a new message every 100ms
- `$$$$$$` - Fill up scrollback (1000 messages), then add a new message every 50ms
- `$$$$$$:e` - Add a new message every 50ms
- `$$$$$$$` - Fill up scrollback (1000 messages), then add a new message every 25ms
- `$$$$$$$:e` - Add a new message every 25ms
Themes are loaded from the Themes directory (under the Chatterino directory, so %APPDATA%/Chatterino2/Themes).
Themes are json files (see the built in themes as an example).
After importing a theme, you must restart Chatterino for it to show up in the settings
Fixes a bug where we don't check if the sound device is active before trying to play a sound to it
We fix this by checking its state before every sound we try to play, and if the device is not in the started state we try to restart it.
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>
The `SettingsPage::onShow` handler that sets up the block
list is only called when the application settings dialog
has already been shown once before. This caused the blocked
user list to appear empty until the second time it was opened.
Correct this by explicitly regenerating the block list in the
constructor of `IgnoresPage`.
* Update `CMakeLists.txt`
* Update `resources/com.chatterino.chatterino.appdata.xml`
* Update `src/common/Version.hpp`
* Update `CHANGELOG.md`
This includes changelog re-ordering changes that would normally be in a seperate PR, but this release will be an exception to that rule
This change also adds a new environment variable used while building: `CHATTERINO_REQUIRE_CLEAN_GIT` which, if set, will error out during your build's GIT stage.
This is used in CI to ensure we don't accidentally introduce a change that would result in builds showing up as "modified" again.
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* feat: crashpad on windows
* feat: inline it
* feat: more crashpad
* chore: remove qBreakpad
* fix: add mention to crashpad
* refactor: version string
* feat: add crashpad module
* refactor: build crashpad from source
* fix: minor adjustments
* chore: add changelog entry
* fix: formatting and include
* fix: format
* build: use flags similar to release profile
* ci: build with crashpad on windows
* ci: recurse submodules
* ci: always include crashpad
* fix: try 7z
for some reason zstd just doesn't run
* fix: wrong path for symbols
* fix: copy
pls don't build
* ci: use new cache key
* fix: missing pragma
* ci: add workflow without crashpad
* docs: elevate changelog entry
* fix: add link to cmake issue
* fix: windows include issue
Someone (crashpad) includes Windows.h before winsock2.h
* fix: working directory
* fix: another working directory
* 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>
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
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>
* Pass link as argument instead of in command string when opening incognito links
* Update CHANGELOG.md
* Make changelog message more user facing
* Remove now unused argument for getCommand
* ci: format yaml and json files with prettier
* chore: add changelog entry
* fix: format everything
* ci: run pretter on all files
* ci: rename prettier step
* Add checkbox for custom logging and table with channels to log on Logs page
* Add checkbox to enable and disable logging per channel
* Return from addMessage before logging if custom logging enabled and channel does not have logging enabled
* Use clang-format to fix formatting
* Add CHANGELOG.md entry
* Resolve PR comments
* Remove toggle for channels so any channel listed will be logged
* Move Only log channels listed below checkbox to just above table
* Fix formatting
* Re-order changelog
* ChannelLog constructor: Copy & move instead of const ref & copy
* ChannelLog::createEmpty: Curly brace initialize instead of repeating
name
* ChannelLog toString & createEmpty: nodiscard
* Use COUNT paradigm in model column
* Remove ChanneLoggingModel source file comments
* Use Column::Channel in getRowFromItem
* Rename `getItemFromRow` parameter and mark it as unused
* Curly brace initialize ChannelLog
* private & friend class the model
* Filter out channels to log using a set instead of iterating over a vector every time a message comes in
* Rename `ChannelLog::channel` member to `ChannelLog::channelName`
Also made it private
* mini comment on ChannelLog
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* Add `<functional>` include to QStringHash.hpp
This ensures the base `std::hash` template is declared before this
specialization
* Add missing includes to `src/providers/twitch/TwitchAccountManager.hpp`
* Move explicit HelixChatters constructor to the source file
* Remove unused includes & add used includes to NicknamesModel.hpp
* NicknamesModel.hpp: Remove `virtual` when `override` is used
* Add missing QStringHash include to TwitchEmotes.cpp
* Add missing includes to various files
* Print Qt version in cmake step
Technically unrelated, but I'm sneaking it in
* Add changelog entry