* 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
* 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>
* 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
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)
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
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`.
* 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
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>
* 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
* Fix crash that could occur when closing down splits
Specifically, if a split was closed after the request for a thumbnail
had been made, but before the request had finished, we'd run into a
use-after-free issue
* Add changelog entry
* Flatten static functions in anonymous namespace
* SplitHeader ctor: Rename param
* Header: Remove unnecessary `virtual`s
* auto ptr where possible
* Add curly braces
* Comment twitch room modes
* Treat roomModes->slowMode as an integer
* Remove unused `this` from lambdas
* Add `unsigned int` overload for localizeNumbers
* Move thumbnail max age to a constexpr static & set explicit types
* Explicitly use `QObject::connect`
* Use `empty()` instead of `size()`
* Name unused parameters
* Move moderation action refreshing logic from SplitHeader to Split
* fix: remove unused includes
* fix: bad includes
* fix: top include
* fix: streamer mode includes
* fix: missing include
* fix: remove `#else`
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
* Remove unused include util/Helpers.hpp
* SplitContainer::setTag fix parameter naming
* autofy/constify where possible
* More const auto ptr magicifying
* Make SplitNode::Type an enum class
* Move QuickSwitcherPopup includes from header to source file
* Remove unused DropRegion code
* use empty() instead of size() == 0
* Add curly braces everywhere
* Remove useless reinterpret_cast
It was casting Node* to Node*
* Clarify that the connect is QObject::connect
* SplitContainer::setSelected fix parameter naming
* Rename function variables to remove unneccesary underscore
Also move addSpacing parameter out of the layout function
* emplace_back where possible
* Name parameters
* Remove ineffective const from return type
* Make node getters const
* Flatten Node::releaseSplit
* Rename in-function variable to match code style
* [ACTUAL CODE CHANGE/MOVE] Move clamp logic to its own function
* name params
* applyFromDescriptorRecursively: rename node param to baseNode
* [ACTUAL CODE CHANGE/MOVE] Remove the many overloads for append/insertSplit
This utilizes the C++20 designed initializers aggregate initialization feature
* Remove unused includes
* [ACTUAL CODE CHANGE] Clean up dragging logic
There's no need to keep a pointer around to which split is being
dragged, it's already stored in the QDropEvent source()
* UNRELATED .clang-tidy: Only suggest UPPER_CASE for constant global variables
* Remove unused SplitContainer::getSplitCount function
* Use std::max in Node's clamp function
* Remove test code
* DraggedSplit.hpp: remove unused include
* Split `setDraggingSplit` into two functions, `startDraggingSplit` and `stopDraggingSplit`
* feat: c++ 20
* fix: c++ 20 deprecations
* fix(msvc): warnings
* chore: add changelog entry
* fix: formatting
* Update websocketpp to the `develop` branch
* Specify other template type in FlagsEnum != operator
* Remove the user of simple template ids in our websocketpp template class
Also standardizes the file a bit by using nested namespaces, using
pragma once
* fix: turn `MAGIC_MESSAGE_SUFFIX` into a `QString`
* hacky unhacky hacky const char hack
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Flatten the anonymous namespace
Make the `loadEmojis` functions static
Make the `filterEmoteMap` function static
Return an EmoteMap from `filterEmoteMap` instead of an EmoteMap*
Other misc cool changes :-)
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)
* feat(helix): create response model for VIP listing
* feat(helix): stub out channel/vips request + handler
* feat(helix): parse VIPs list from data and pass to callback
* feat(helix): handle errors when getting VIP list then pass to callback
* feat(command): add barebones handler for helix-based /vips
* feat(command): provide better /vips output when user is not broadcaster
* chore(format): bulk reformat with clang-format
* chore(changelog): add entry for /vips Helix migration
* fix(helix): use correct method when calling VIP list endpoint
* fix(helix): use correct VIP list endpoint
* chore(tidy): please clang-tidy by marking parameter as unused
* feat(command): display unsorted VIP list returned from Helix API
* feat(settings): clone raid timegate settings for /vips
* feat(command): check /vips timegate setting before execution
* feat(command): handle 0 VIPs from Helix response
* feat(command): sort users alphabetically from Helix VIPs response
* fix(command): highlight users in Helix /vips output to match IRC
* fix(command): replace dynamic /vips error message with hardcoded string
* chore(comment): remove TODO comment that was DONE
* chore(format): bulk reformat using clang-format
* fix(command): send 0 VIP message after creation
* chore: apply suggestions from Felanbird
* fix(helix): change mention of user ban to VIPs in VIP list error message
* feat(helix): distinguish non-broadcaster auth error when getting VIPs
* chore(command): move handling of non-broadcaster /vips usage to API response
* chore(format): re-indent multiline string to get away from 80 char limit
* reformat
* fix tests
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
* Add initial support for finding hotkey display key sequences
* Make neededArguments work
* Implement displaying key combos in SplitHeader main menu
* Make Settings search text dynamic
* Make tab hide notice use a custom hotkeys key sequence
* Make Notebook menus use custom hotkeys key combo lookup for hiding tabs
* shut up changelog ci
* Make NotebookTab menus show custom hotkeys. SCUFFED:
this does not update dynamically!
* Scuffed: Make the show prefs button setting show the key bind
* Scuffed: Make the R9K description refer to hotkeys
* @pajlada, is something like this ok?
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
* feat: add `Go to message` action in search popup
* chore: add changelog entry
* fix: only scroll if the scrollbar is shown
* fix: go to message when view isn't focused
* feat: animate highlighted message
* fix: missing includes
* fix: order of initialization
* fix: add `ChannelView::mayContainMessage` to filter messages
* feat: add `Go to message` action in `/mentions`
* fix: ignore any mentions channel when searching for split
* feat: add `Go to message` action in reply-threads
* fix: remove redundant `source` parameter
* feat: add `Go to message` action in user-cards
* feat: add link to deleted message
* fix: set current time to 0 when starting animation
* chore: update changelog
* fix: add default case (unreachable)
* chore: removed unused variable
* fix: search in mentions
* fix: always attempt to focus split
* fix: rename `Link::MessageId` to `Link::JumpToMessage`
* fix: rename `selectAndScrollToMessage` to `scrollToMessage`
* fix: rename internal `scrollToMessage` to `scrollToMessageLayout`
* fix: deleted message link in search popup
* chore: reword explanation
* fix: use for-loop instead of `std::find_if`
* refactor: define highlight colors in `BaseTheme`
* core: replace `iff` with `if`
* fix: only return if the message found
* Reword/phrase/dot changelog entries
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
* Add working reconnect recent messages
* Rename method to messagesUpdated
* Use audo declarations
* Add docs to new LimitedQueue methods
* Add more documentation, try atomic loading flag
* Update CHANGELOG.md
* Remove unused include
* Rename 'reconnected' signal to 'connected'
* Reserve before filtering on arbitrary update
* Extract recent messages fetching to own class
* Use std::atomic_flag instead of std::atomic_bool
* Add PostToThread include
* Add chatterino.recentmessages logging
* Remove unneeded parameters, lambda move capture
* Remove TwitchChannel::buildRecentMessages
* Add documentation, use more clear method name
* Reword changelog entry
I think it sounds better like this :)
* Rework how filling in missing messages is handled
This should hopefully prevent issues with filtered channels with old messages
that no longer exist in the underlying channel
* Check existing messages when looking for reply
* Clean up string distribution in file
* Try to improve documentation
* Use std::function for RecentMessagesApi
* Only trigger filledInMessages if we inserted
* Remove old unused lines
* Use make_shared<MessageLayout> instead of new MessageLayout
* Alphabetize QLogging categories
* Reorder CHANGELOG.md
* Use circular buffer for LimitedQueue
* Reduce copying of snapshot
* Small optimizations
* Remove unneeded lock statements
* Add LimitedQueue tests
* Fix includes for limited queue benchmark
* Update CHANGELOG.md
* Use correct boost version iterators
* Use a shared_mutex to clarify reads and writes
* Update `find`/`rfind` to return the result as a boost::optional
* Use `[[nodiscard]]` where applicable
* Update comments
* Add a couple more doc comments
* Replace size with get
get is a safe (locked & checked) version of at
* Use std::vector in LimitedQueueSnapshot
* Update LimitedQueue benchmarks
* Add mutex guard to buffer accessors
We do not know whether T is an atomic type or not
so we can't safely say that we can copy the value
at a certain address of the buffer.
See https://stackoverflow.com/a/2252478
* Update doc comments, add first/last getters
* Make limit_ const
* Omit `else` if the if-case always returns
* Title case category comments
* Remove `at`
* Fix `get` comment
* Privatize/comment/lock property accessors
- `limit` is now private
- `space` is now private
- `full` has been removed
- `empty` now locks
* Remove `front` function
* Remove `back` method
* Add comment to `first`
* Add comment to `last`
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
added new `GIT_MODIFIED` variable - used to determine whether the vcs tree was compiled or not at the time of building the app
added information about running in DEBUG mode which might be very helpful to determine whether one is running a DEBUG build, e.g. in the process of troubleshooting/determining crash causes
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Streamer mode now automatically detects if XSplit, PRISM Live Studio, Twitch Studio, or vMix are running
Co-authored-by: Kasia <zneix@zneix.eu>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>