Compare commits

..

1 commit

Author SHA1 Message Date
nerix 8504d35083
Merge 738cddeb6b into 101a45fd3a 2024-11-02 13:56:54 +01:00
52 changed files with 245 additions and 888 deletions

View file

@ -41,7 +41,7 @@ jobs:
- name: clang-tidy review - name: clang-tidy review
timeout-minutes: 20 timeout-minutes: 20
uses: ZedThree/clang-tidy-review@v0.20.0 uses: ZedThree/clang-tidy-review@v0.19.0
with: with:
build_dir: build-clang-tidy build_dir: build-clang-tidy
config_file: ".clang-tidy" config_file: ".clang-tidy"
@ -63,4 +63,4 @@ jobs:
libxkbcommon-x11-0, libxcb-xkb-dev, libxcb-cursor0 libxkbcommon-x11-0, libxcb-xkb-dev, libxcb-cursor0
- name: clang-tidy-review upload - name: clang-tidy-review upload
uses: ZedThree/clang-tidy-review/upload@v0.20.0 uses: ZedThree/clang-tidy-review/upload@v0.19.0

View file

@ -14,7 +14,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps: steps:
- uses: ZedThree/clang-tidy-review/post@v0.20.0 - uses: ZedThree/clang-tidy-review/post@v0.19.0
with: with:
lgtm_comment_body: "" lgtm_comment_body: ""
num_comments_as_exitcode: false num_comments_as_exitcode: false

1
.gitmodules vendored
View file

@ -38,7 +38,6 @@
[submodule "lib/lua/src"] [submodule "lib/lua/src"]
path = lib/lua/src path = lib/lua/src
url = https://github.com/lua/lua url = https://github.com/lua/lua
branch = v5.4
[submodule "tools/crash-handler"] [submodule "tools/crash-handler"]
path = tools/crash-handler path = tools/crash-handler
url = https://github.com/Chatterino/crash-handler url = https://github.com/Chatterino/crash-handler

View file

@ -34,14 +34,9 @@
- Minor: Moderators can now see which mods start and cancel raids. (#5563) - Minor: Moderators can now see which mods start and cancel raids. (#5563)
- Minor: The emote popup now reloads when Twitch emotes are reloaded. (#5580) - Minor: The emote popup now reloads when Twitch emotes are reloaded. (#5580)
- Minor: Added `--login <username>` CLI argument to specify which account to start logged in as. (#5626) - Minor: Added `--login <username>` CLI argument to specify which account to start logged in as. (#5626)
- Minor: When blocking a channel, Chatterino will now warn you about that action. (#5615)
- Minor: Indicate when subscriptions and resubscriptions are for multiple months. (#5642) - Minor: Indicate when subscriptions and resubscriptions are for multiple months. (#5642)
- Minor: Added a setting to control whether or not to show "Blocked Term" automod messages. (#5690)
- Minor: Proxy URL information is now included in the `/debug-env` command. (#5648) - Minor: Proxy URL information is now included in the `/debug-env` command. (#5648)
- Minor: Make raid entry message usernames clickable. (#5651) - Minor: Make raid entry message usernames clickable. (#5651)
- Minor: Tabs unhighlight when their content is read in other tabs. (#5649)
- Minor: Made usernames in bits and sub messages clickable. (#5686)
- Minor: Mentions of FrankerFaceZ and BetterTTV in settings are standardized as such. (#5698)
- Minor: Added support for the "Device code grant flow" for authentication. (#5680) - Minor: Added support for the "Device code grant flow" for authentication. (#5680)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426, #5612) - Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426, #5612)
- Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378) - Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378)
@ -60,7 +55,6 @@
- Bugfix: Fixed event emotes not showing up in autocomplete and popups. (#5239, #5580, #5582, #5632) - Bugfix: Fixed event emotes not showing up in autocomplete and popups. (#5239, #5580, #5582, #5632)
- Bugfix: Fixed tab visibility being controllable in the emote popup. (#5530) - Bugfix: Fixed tab visibility being controllable in the emote popup. (#5530)
- Bugfix: Fixed account switch not being saved if no other settings were changed. (#5558) - Bugfix: Fixed account switch not being saved if no other settings were changed. (#5558)
- Bugfix: Fixed a crash that could occur when handling the quick switcher popup really quickly. (#5687)
- Bugfix: Fixed 7TV badges being inadvertently animated. (#5674) - Bugfix: Fixed 7TV badges being inadvertently animated. (#5674)
- Bugfix: Fixed some tooltips not being readable. (#5578) - Bugfix: Fixed some tooltips not being readable. (#5578)
- Bugfix: Fixed log files being locked longer than needed. (#5592) - Bugfix: Fixed log files being locked longer than needed. (#5592)
@ -71,8 +65,6 @@
- Bugfix: Fixed emotes starting with ":" not tab-completing. (#5603) - Bugfix: Fixed emotes starting with ":" not tab-completing. (#5603)
- Bugfix: Fixed 7TV emotes messing with Qt's HTML. (#5677) - Bugfix: Fixed 7TV emotes messing with Qt's HTML. (#5677)
- Bugfix: Fixed incorrect messages getting replaced visually. (#5683) - Bugfix: Fixed incorrect messages getting replaced visually. (#5683)
- Bugfix: Fixed rendering of multi-line selection that starts at a trailing space. (#5691)
- Bugfix: Fixed pause indicator not appearing in certain cases. (#5707)
- Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420) - Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420)
- Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422) - Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422)
- Dev: Unsingletonize `ISoundController`. (#5462) - Dev: Unsingletonize `ISoundController`. (#5462)
@ -121,14 +113,11 @@
- Dev: `GIFTimer` is no longer initialized in tests. (#5608) - Dev: `GIFTimer` is no longer initialized in tests. (#5608)
- Dev: Emojis now use flags instead of a set of strings for capabilities. (#5616) - Dev: Emojis now use flags instead of a set of strings for capabilities. (#5616)
- Dev: Move plugins to Sol2. (#5622, #5682) - Dev: Move plugins to Sol2. (#5622, #5682)
- Dev: Clarified our Lua dependency's version. (#5693)
- Dev: Specified qtkeychain dependency version. (#5695, #5697)
- Dev: Refactored static `MessageBuilder` helpers to standalone functions. (#5652) - Dev: Refactored static `MessageBuilder` helpers to standalone functions. (#5652)
- Dev: Decoupled reply parsing from `MessageBuilder`. (#5660, #5668) - Dev: Decoupled reply parsing from `MessageBuilder`. (#5660, #5668)
- Dev: Refactored IRC message building. (#5663) - Dev: Refactored IRC message building. (#5663)
- Dev: Fixed some compiler warnings. (#5672) - Dev: Fixed some compiler warnings. (#5672)
- Dev: Unified parsing of historic and live IRC messages. (#5678) - Dev: Unified parsing of historic and live IRC messages. (#5678)
- Dev: 7TV's `entitlement.reset` is now explicitly ignored. (#5685)
## 2.5.1 ## 2.5.1

View file

@ -160,19 +160,10 @@ if (BUILD_WITH_QTKEYCHAIN)
message(FATAL_ERROR "Submodules probably not loaded, unable to find lib/qtkeychain/CMakeLists.txt") message(FATAL_ERROR "Submodules probably not loaded, unable to find lib/qtkeychain/CMakeLists.txt")
endif() endif()
set(_prev_testing ${BUILD_TESTING})
set(BUILD_TESTING Off)
add_subdirectory("${QTKEYCHAIN_ROOT_LIB_FOLDER}" EXCLUDE_FROM_ALL) add_subdirectory("${QTKEYCHAIN_ROOT_LIB_FOLDER}" EXCLUDE_FROM_ALL)
set(BUILD_TESTING ${_prev_testing})
if (NOT TARGET qt${MAJOR_QT_VERSION}keychain) if (NOT TARGET qt${MAJOR_QT_VERSION}keychain)
message(FATAL_ERROR "qt${MAJOR_QT_VERSION}keychain target was not created :@") message(FATAL_ERROR "qt${MAJOR_QT_VERSION}keychain target was not created :@")
endif() endif()
if (MSVC AND "${MAJOR_QT_VERSION}" STREQUAL "5")
target_compile_definitions(qt5keychain PRIVATE UNICODE)
target_compile_options(qt5keychain PRIVATE /utf-8)
set_target_properties(qt5keychain PROPERTIES CXX_STANDARD 17)
endif()
endif() endif()
endif() endif()

@ -1 +1 @@
Subproject commit 73c3772d6432280df83e1ab3299c2a8f1e4ea47f Subproject commit e5b070831cf1ea3cb98c95f97fcb7439f8d79bd6

View file

@ -422,7 +422,7 @@ public:
// get followed channel // get followed channel
MOCK_METHOD( MOCK_METHOD(
void, getFollowedChannel, void, getFollowedChannel,
(QString userID, QString broadcasterID, const QObject *caller, (QString userID, QString broadcasterID,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback), FailureCallback<QString> failureCallback),
(override)); (override));

View file

@ -6,10 +6,6 @@
#include <QSize> #include <QSize>
#include <QString> #include <QString>
#include <memory>
#include <string>
#include <type_traits>
namespace chatterino { namespace chatterino {
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting); void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting);
@ -166,9 +162,6 @@ struct IsChatterinoSettingT : std::false_type {
template <typename T> template <typename T>
struct IsChatterinoSettingT<ChatterinoSetting<T>> : std::true_type { struct IsChatterinoSettingT<ChatterinoSetting<T>> : std::true_type {
}; };
template <typename T>
struct IsChatterinoSettingT<EnumStringSetting<T>> : std::true_type {
};
template <typename T> template <typename T>
concept IsChatterinoSetting = IsChatterinoSettingT<T>::value; concept IsChatterinoSetting = IsChatterinoSettingT<T>::value;

View file

@ -24,7 +24,7 @@
# include "qt5keychain/keychain.h" # include "qt5keychain/keychain.h"
# endif # endif
# else # else
# include <qtkeychain/keychain.h> # include "keychain.h"
# endif # endif
#endif #endif

View file

@ -26,7 +26,6 @@
#include "providers/twitch/api/Helix.hpp" #include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/ChannelPointReward.hpp" #include "providers/twitch/ChannelPointReward.hpp"
#include "providers/twitch/PubSubActions.hpp" #include "providers/twitch/PubSubActions.hpp"
#include "providers/twitch/pubsubmessages/AutoMod.hpp"
#include "providers/twitch/TwitchAccount.hpp" #include "providers/twitch/TwitchAccount.hpp"
#include "providers/twitch/TwitchBadge.hpp" #include "providers/twitch/TwitchBadge.hpp"
#include "providers/twitch/TwitchBadges.hpp" #include "providers/twitch/TwitchBadges.hpp"
@ -53,7 +52,6 @@
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QFileInfo> #include <QFileInfo>
#include <QStringBuilder>
#include <QTimeZone> #include <QTimeZone>
#include <algorithm> #include <algorithm>
@ -77,8 +75,6 @@ const QRegularExpression mentionRegex("^@" + regexHelpString);
// if findAllUsernames setting is enabled, matches strings like in the examples above, but without @ symbol at the beginning // if findAllUsernames setting is enabled, matches strings like in the examples above, but without @ symbol at the beginning
const QRegularExpression allUsernamesMentionRegex("^" + regexHelpString); const QRegularExpression allUsernamesMentionRegex("^" + regexHelpString);
const QRegularExpression SPACE_REGEX("\\s");
const QSet<QString> zeroWidthEmotes{ const QSet<QString> zeroWidthEmotes{
"SoSnowy", "IceCold", "SantaHat", "TopHat", "SoSnowy", "IceCold", "SantaHat", "TopHat",
"ReinDeer", "CandyCane", "cvMask", "cvHazmat", "ReinDeer", "CandyCane", "cvMask", "cvHazmat",
@ -516,7 +512,7 @@ MessageBuilder::MessageBuilder(SystemMessageTag, const QString &text,
// check system message for links // check system message for links
// (e.g. needed for sub ticket message in sub only mode) // (e.g. needed for sub ticket message in sub only mode)
const QStringList textFragments = const QStringList textFragments =
text.split(SPACE_REGEX, Qt::SkipEmptyParts); text.split(QRegularExpression("\\s"), Qt::SkipEmptyParts);
for (const auto &word : textFragments) for (const auto &word : textFragments)
{ {
auto link = linkparser::parse(word); auto link = linkparser::parse(word);
@ -535,100 +531,33 @@ MessageBuilder::MessageBuilder(SystemMessageTag, const QString &text,
this->message().searchText = text; this->message().searchText = text;
} }
MessagePtrMut MessageBuilder::makeSystemMessageWithUser( MessageBuilder::MessageBuilder(RaidEntryMessageTag, const QString &text,
const QString &text, const QString &loginName, const QString &displayName, const QString &loginName,
const MessageColor &userColor, const QTime &time) const QString &displayName,
const MessageColor &userColor, const QTime &time)
: MessageBuilder()
{ {
MessageBuilder builder; this->emplace<TimestampElement>(time);
builder.emplace<TimestampElement>(time);
const auto textFragments = text.split(SPACE_REGEX, Qt::SkipEmptyParts); const QStringList textFragments =
text.split(QRegularExpression("\\s"), Qt::SkipEmptyParts);
for (const auto &word : textFragments) for (const auto &word : textFragments)
{ {
if (word == displayName) if (word == displayName)
{ {
builder.emplace<MentionElement>(displayName, loginName, this->emplace<MentionElement>(displayName, loginName,
MessageColor::System, userColor); MessageColor::System, userColor);
continue; continue;
} }
builder.emplace<TextElement>(word, MessageElementFlag::Text, this->emplace<TextElement>(word, MessageElementFlag::Text,
MessageColor::System); MessageColor::System);
} }
builder->flags.set(MessageFlag::System); this->message().flags.set(MessageFlag::System);
builder->flags.set(MessageFlag::DoNotTriggerNotification); this->message().flags.set(MessageFlag::DoNotTriggerNotification);
builder->messageText = text; this->message().messageText = text;
builder->searchText = text; this->message().searchText = text;
return builder.release();
}
MessagePtrMut MessageBuilder::makeSubgiftMessage(const QString &text,
const QVariantMap &tags,
const QTime &time)
{
MessageBuilder builder;
builder.emplace<TimestampElement>(time);
auto gifterLogin = tags.value("login").toString();
auto gifterDisplayName = tags.value("display-name").toString();
if (gifterDisplayName.isEmpty())
{
gifterDisplayName = gifterLogin;
}
MessageColor gifterColor = MessageColor::System;
if (auto colorTag = tags.value("color").value<QColor>(); colorTag.isValid())
{
gifterColor = MessageColor(colorTag);
}
auto recipientLogin =
tags.value("msg-param-recipient-user-name").toString();
if (recipientLogin.isEmpty())
{
recipientLogin = tags.value("msg-param-recipient-name").toString();
}
auto recipientDisplayName =
tags.value("msg-param-recipient-display-name").toString();
if (recipientDisplayName.isEmpty())
{
recipientDisplayName = recipientLogin;
}
const auto textFragments = text.split(SPACE_REGEX, Qt::SkipEmptyParts);
for (const auto &word : textFragments)
{
if (word == gifterDisplayName)
{
builder.emplace<MentionElement>(gifterDisplayName, gifterLogin,
MessageColor::System, gifterColor);
continue;
}
if (word.endsWith('!') &&
word.size() == recipientDisplayName.size() + 1 &&
word.startsWith(recipientDisplayName))
{
builder
.emplace<MentionElement>(recipientDisplayName, recipientLogin,
MessageColor::System,
MessageColor::System)
->setTrailingSpace(false);
builder.emplace<TextElement>(u"!"_s, MessageElementFlag::Text,
MessageColor::System);
continue;
}
builder.emplace<TextElement>(word, MessageElementFlag::Text,
MessageColor::System);
}
builder->flags.set(MessageFlag::System);
builder->flags.set(MessageFlag::DoNotTriggerNotification);
builder->messageText = text;
builder->searchText = text;
return builder.release();
} }
MessageBuilder::MessageBuilder(TimeoutMessageTag, const QString &timeoutUser, MessageBuilder::MessageBuilder(TimeoutMessageTag, const QString &timeoutUser,
@ -1639,12 +1568,6 @@ std::pair<MessagePtr, MessagePtr> MessageBuilder::makeAutomodMessage(
{ {
MessageBuilder builder, builder2; MessageBuilder builder, builder2;
if (action.reasonCode == PubSubAutoModQueueMessage::Reason::BlockedTerm)
{
builder.message().flags.set(MessageFlag::AutoModBlockedTerm);
builder2.message().flags.set(MessageFlag::AutoModBlockedTerm);
}
// //
// Builder for AutoMod message with explanation // Builder for AutoMod message with explanation
builder.message().id = "automod_" + action.msgID; builder.message().id = "automod_" + action.msgID;
@ -1988,29 +1911,6 @@ MessagePtr MessageBuilder::makeLowTrustUpdateMessage(
return builder.release(); return builder.release();
} }
MessagePtrMut MessageBuilder::makeAccountExpiredMessage(
const QString &expirationText)
{
auto loginPromptText = u"Try adding your account again."_s;
MessageBuilder builder;
auto text = expirationText % ' ' % loginPromptText;
builder->messageText = text;
builder->searchText = text;
builder->flags.set(MessageFlag::System,
MessageFlag::DoNotTriggerNotification);
builder.emplace<TimestampElement>();
builder.emplace<TextElement>(expirationText, MessageElementFlag::Text,
MessageColor::System);
builder
.emplace<TextElement>(loginPromptText, MessageElementFlag::Text,
MessageColor::Link)
->setLink({Link::OpenAccountsPage, {}});
return builder.release();
}
std::pair<MessagePtrMut, HighlightAlert> MessageBuilder::makeIrcMessage( std::pair<MessagePtrMut, HighlightAlert> MessageBuilder::makeIrcMessage(
/* mutable */ Channel *channel, const Communi::IrcMessage *ircMessage, /* mutable */ Channel *channel, const Communi::IrcMessage *ircMessage,
const MessageParseArgs &args, /* mutable */ QString content, const MessageParseArgs &args, /* mutable */ QString content,

View file

@ -52,6 +52,8 @@ namespace linkparser {
struct SystemMessageTag { struct SystemMessageTag {
}; };
struct RaidEntryMessageTag {
};
struct TimeoutMessageTag { struct TimeoutMessageTag {
}; };
struct LiveUpdatesUpdateEmoteMessageTag { struct LiveUpdatesUpdateEmoteMessageTag {
@ -67,6 +69,7 @@ struct ImageUploaderResultTag {
// NOLINTBEGIN(readability-identifier-naming) // NOLINTBEGIN(readability-identifier-naming)
const SystemMessageTag systemMessage{}; const SystemMessageTag systemMessage{};
const RaidEntryMessageTag raidEntryMessage{};
const TimeoutMessageTag timeoutMessage{}; const TimeoutMessageTag timeoutMessage{};
const LiveUpdatesUpdateEmoteMessageTag liveUpdatesUpdateEmoteMessage{}; const LiveUpdatesUpdateEmoteMessageTag liveUpdatesUpdateEmoteMessage{};
const LiveUpdatesRemoveEmoteMessageTag liveUpdatesRemoveEmoteMessage{}; const LiveUpdatesRemoveEmoteMessageTag liveUpdatesRemoveEmoteMessage{};
@ -106,6 +109,9 @@ public:
MessageBuilder(SystemMessageTag, const QString &text, MessageBuilder(SystemMessageTag, const QString &text,
const QTime &time = QTime::currentTime()); const QTime &time = QTime::currentTime());
MessageBuilder(RaidEntryMessageTag, const QString &text,
const QString &loginName, const QString &displayName,
const MessageColor &userColor, const QTime &time);
MessageBuilder(TimeoutMessageTag, const QString &timeoutUser, MessageBuilder(TimeoutMessageTag, const QString &timeoutUser,
const QString &sourceUser, const QString &systemMessageText, const QString &sourceUser, const QString &systemMessageText,
int times, const QTime &time = QTime::currentTime()); int times, const QTime &time = QTime::currentTime());
@ -249,18 +255,6 @@ public:
const std::shared_ptr<MessageThread> &thread = {}, const std::shared_ptr<MessageThread> &thread = {},
const MessagePtr &parent = {}); const MessagePtr &parent = {});
static MessagePtrMut makeSystemMessageWithUser(
const QString &text, const QString &loginName,
const QString &displayName, const MessageColor &userColor,
const QTime &time);
static MessagePtrMut makeSubgiftMessage(const QString &text,
const QVariantMap &tags,
const QTime &time);
static MessagePtrMut makeAccountExpiredMessage(
const QString &expirationText);
private: private:
struct TextState { struct TextState {
TwitchChannel *twitchChannel = nullptr; TwitchChannel *twitchChannel = nullptr;

View file

@ -52,8 +52,6 @@ enum class MessageFlag : std::int64_t {
Action = (1LL << 36), Action = (1LL << 36),
/// The message is sent in a different source channel as part of a Shared Chat session /// The message is sent in a different source channel as part of a Shared Chat session
SharedMessage = (1LL << 37), SharedMessage = (1LL << 37),
/// AutoMod message that showed up due to containing a blocked term in the channel
AutoModBlockedTerm = (1LL << 38),
}; };
using MessageFlags = FlagsEnum<MessageFlag>; using MessageFlags = FlagsEnum<MessageFlag>;

View file

@ -141,9 +141,6 @@ void MessageLayout::actuallyLayout(const MessageLayoutContext &ctx)
bool hideModerated = getSettings()->hideModerated; bool hideModerated = getSettings()->hideModerated;
bool hideModerationActions = getSettings()->hideModerationActions; bool hideModerationActions = getSettings()->hideModerationActions;
bool hideBlockedTermAutomodMessages =
getSettings()->showBlockedTermAutomodMessages.getEnum() ==
ShowModerationState::Never;
bool hideSimilar = getSettings()->hideSimilar; bool hideSimilar = getSettings()->hideSimilar;
bool hideReplies = !ctx.flags.has(MessageElementFlag::RepliedMessage); bool hideReplies = !ctx.flags.has(MessageElementFlag::RepliedMessage);
@ -157,21 +154,9 @@ void MessageLayout::actuallyLayout(const MessageLayoutContext &ctx)
continue; continue;
} }
if (hideBlockedTermAutomodMessages &&
this->message_->flags.has(MessageFlag::AutoModBlockedTerm))
{
// NOTE: This hides the message but it will make the message re-appear if moderation message hiding is no longer active, and the layout is re-laid-out.
// This is only the case for the moderation messages that don't get filtered during creation.
// We should decide which is the correct method & apply that everywhere
continue;
}
if (this->message_->flags.has(MessageFlag::Timeout) || if (this->message_->flags.has(MessageFlag::Timeout) ||
this->message_->flags.has(MessageFlag::Untimeout)) this->message_->flags.has(MessageFlag::Untimeout))
{ {
// NOTE: This hides the message but it will make the message re-appear if moderation message hiding is no longer active, and the layout is re-laid-out.
// This is only the case for the moderation messages that don't get filtered during creation.
// We should decide which is the correct method & apply that everywhere
if (hideModerationActions || if (hideModerationActions ||
(getSettings()->streamerModeHideModActions && (getSettings()->streamerModeHideModActions &&
getApp()->getStreamerMode()->isEnabled())) getApp()->getStreamerMode()->isEnabled()))

View file

@ -854,18 +854,6 @@ std::optional<size_t> MessageLayoutContainer::paintSelectionStart(
{ {
const auto selectionColor = getTheme()->messages.selection; const auto selectionColor = getTheme()->messages.selection;
auto paintRemainingLines = [&](size_t startIndex) {
for (size_t i = startIndex; i < this->lines_.size(); i++)
{
const auto &line = this->lines_[i];
auto left = this->elements_[line.startIndex]->getRect().left();
auto right = this->elements_[line.endIndex - 1]->getRect().right();
this->paintSelectionRect(painter, line, left, right, yOffset,
selectionColor);
}
};
// The selection starts in this message // The selection starts in this message
for (size_t lineIndex = 0; lineIndex < this->lines_.size(); lineIndex++) for (size_t lineIndex = 0; lineIndex < this->lines_.size(); lineIndex++)
{ {
@ -886,17 +874,7 @@ std::optional<size_t> MessageLayoutContainer::paintSelectionStart(
auto right = this->elements_[line.endIndex - 1]->getRect().right(); auto right = this->elements_[line.endIndex - 1]->getRect().right();
this->paintSelectionRect(painter, line, right, right, yOffset, this->paintSelectionRect(painter, line, right, right, yOffset,
selectionColor); selectionColor);
return std::nullopt;
if (selection.selectionMax.messageIndex != messageIndex)
{
// The selection does not end in this message
paintRemainingLines(lineIndex + 1);
return std::nullopt;
}
// The selection starts in this line, but ends in some next line or message
return {lineIndex + 1};
} }
int x = this->elements_[line.startIndex]->getRect().left(); int x = this->elements_[line.startIndex]->getRect().left();
@ -945,9 +923,21 @@ std::optional<size_t> MessageLayoutContainer::paintSelectionStart(
if (selection.selectionMax.messageIndex != messageIndex) if (selection.selectionMax.messageIndex != messageIndex)
{ {
// The selection does not end in this message // The selection does not end in this message
for (size_t lineIndex2 = lineIndex + 1;
lineIndex2 < this->lines_.size(); lineIndex2++)
{
const auto &line2 = this->lines_[lineIndex2];
auto left =
this->elements_[line2.startIndex]->getRect().left();
auto right =
this->elements_[line2.endIndex - 1]->getRect().right();
this->paintSelectionRect(painter, line2, left, right,
yOffset, selectionColor);
}
this->paintSelectionRect(painter, line, x, r, yOffset, this->paintSelectionRect(painter, line, x, r, yOffset,
selectionColor); selectionColor);
paintRemainingLines(lineIndex + 1);
return std::nullopt; return std::nullopt;
} }

View file

@ -283,12 +283,7 @@ private:
/** /**
* Paint the selection start * Paint the selection start
* *
* @returns A line index if the selection ends within this message but start * Returns a line index if this message should also paint the selection end
* and end are on different lines. The returned index is the index
* of the first line where the selection starts at the beginning of
* the line. This index should be passed to paintSelectionEnd().
* If `std::nullopt` is returned, no further call to
* paintSelectionEnd() is necessary.
*/ */
std::optional<size_t> paintSelectionStart(QPainter &painter, std::optional<size_t> paintSelectionStart(QPainter &painter,
size_t messageIndex, size_t messageIndex,

View file

@ -233,14 +233,6 @@ void SeventvEventAPI::handleDispatch(const Dispatch &dispatch)
} }
} }
break; break;
case SubscriptionType::ResetEntitlement: {
// unhandled (not clear what we'd do here yet)
}
break;
case SubscriptionType::CreateEmoteSet: {
// unhandled (c2 does not support custom emote sets)
}
break;
default: { default: {
qCDebug(chatterinoSeventvEventAPI) qCDebug(chatterinoSeventvEventAPI)
<< "Unknown subscription type:" << "Unknown subscription type:"

View file

@ -27,7 +27,6 @@ enum class SubscriptionType {
CreateEntitlement, CreateEntitlement,
UpdateEntitlement, UpdateEntitlement,
DeleteEntitlement, DeleteEntitlement,
ResetEntitlement,
INVALID, INVALID,
}; };
@ -120,8 +119,6 @@ constexpr magic_enum::customize::customize_t magic_enum::customize::enum_name<
return "entitlement.update"; return "entitlement.update";
case SubscriptionType::DeleteEntitlement: case SubscriptionType::DeleteEntitlement:
return "entitlement.delete"; return "entitlement.delete";
case SubscriptionType::ResetEntitlement:
return "entitlement.reset";
default: default:
return default_tag; return default_tag;

View file

@ -230,10 +230,29 @@ MessagePtr parseNoticeMessage(Communi::IrcNoticeMessage *message)
if (message->content().startsWith("Login auth", Qt::CaseInsensitive)) if (message->content().startsWith("Login auth", Qt::CaseInsensitive))
{ {
const auto linkColor = MessageColor(MessageColor::Link);
const auto accountsLink = Link(Link::OpenAccountsPage, QString());
const auto curUser = getApp()->getAccounts()->twitch.getCurrent(); const auto curUser = getApp()->getAccounts()->twitch.getCurrent();
const auto expirationText = QString("Login expired for user \"%1\"!")
.arg(curUser->getUserName());
const auto loginPromptText = QString("Try adding your account again.");
return MessageBuilder::makeAccountExpiredMessage( MessageBuilder builder;
u"Login expired for user \"" % curUser->getUserName() % u"\"!"); auto text = QString("%1 %2").arg(expirationText, loginPromptText);
builder.message().messageText = text;
builder.message().searchText = text;
builder.message().flags.set(MessageFlag::System);
builder.message().flags.set(MessageFlag::DoNotTriggerNotification);
builder.emplace<TimestampElement>();
builder.emplace<TextElement>(expirationText, MessageElementFlag::Text,
MessageColor::System);
builder
.emplace<TextElement>(loginPromptText, MessageElementFlag::Text,
linkColor)
->setLink(accountsLink);
return builder.release();
} }
if (message->content().startsWith("You are permanently banned ")) if (message->content().startsWith("You are permanently banned "))
@ -680,6 +699,35 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
{ {
messageText = "Announcement"; messageText = "Announcement";
} }
else if (msgType == "raid")
{
auto login = tags.value("login").toString();
auto displayName = tags.value("msg-param-displayName").toString();
if (!login.isEmpty() && !displayName.isEmpty())
{
MessageColor color = MessageColor::System;
if (auto colorTag = tags.value("color").value<QColor>();
colorTag.isValid())
{
color = MessageColor(colorTag);
}
auto b = MessageBuilder(
raidEntryMessage, parseTagString(messageText), login,
displayName, color, calculateMessageTime(message).time());
b->flags.set(MessageFlag::Subscription);
if (mirrored)
{
b->flags.set(MessageFlag::SharedMessage);
}
auto newMessage = b.release();
sink.addMessage(newMessage, MessageContext::Original);
return;
}
}
else if (msgType == "subgift") else if (msgType == "subgift")
{ {
if (auto monthsIt = tags.find("msg-param-gift-months"); if (auto monthsIt = tags.find("msg-param-gift-months");
@ -714,20 +762,6 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
} }
} }
} }
// subgifts are special because they include two users
auto msg = MessageBuilder::makeSubgiftMessage(
parseTagString(messageText), tags,
calculateMessageTime(message).time());
msg->flags.set(MessageFlag::Subscription);
if (mirrored)
{
msg->flags.set(MessageFlag::SharedMessage);
}
sink.addMessage(msg, MessageContext::Original);
return;
} }
else if (msgType == "sub" || msgType == "resub") else if (msgType == "sub" || msgType == "resub")
{ {
@ -761,37 +795,17 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
} }
} }
auto displayName = [&] { auto b = MessageBuilder(systemMessage, parseTagString(messageText),
if (msgType == u"raid") calculateMessageTime(message).time());
{
return tags.value("msg-param-displayName").toString();
}
return tags.value("display-name").toString();
}();
auto login = tags.value("login").toString();
if (displayName.isEmpty())
{
displayName = login;
}
MessageColor userColor = MessageColor::System; b->flags.set(MessageFlag::Subscription);
if (auto colorTag = tags.value("color").value<QColor>();
colorTag.isValid())
{
userColor = MessageColor(colorTag);
}
auto msg = MessageBuilder::makeSystemMessageWithUser(
parseTagString(messageText), login, displayName, userColor,
calculateMessageTime(message).time());
msg->flags.set(MessageFlag::Subscription);
if (mirrored) if (mirrored)
{ {
msg->flags.set(MessageFlag::SharedMessage); b->flags.set(MessageFlag::SharedMessage);
} }
auto newMessage = b.release();
sink.addMessage(msg, MessageContext::Original); sink.addMessage(newMessage, MessageContext::Original);
} }
} }

View file

@ -1,7 +1,5 @@
#pragma once #pragma once
#include "providers/twitch/pubsubmessages/AutoMod.hpp"
#include <QColor> #include <QColor>
#include <QDebug> #include <QDebug>
#include <QJsonObject> #include <QJsonObject>
@ -145,7 +143,6 @@ struct AutomodAction : PubSubAction {
QString message; QString message;
QString reason; QString reason;
PubSubAutoModQueueMessage::Reason reasonCode;
QString msgID; QString msgID;
}; };

View file

@ -349,6 +349,40 @@ PubSub::PubSub(const QString &host, std::chrono::seconds pingInterval)
this->moderation.raidCanceled.invoke(action); this->moderation.raidCanceled.invoke(action);
}; };
/*
// This handler is no longer required as we use the automod-queue topic now
this->moderationActionHandlers["automod_rejected"] =
[this](const auto &data, const auto &roomID) {
AutomodAction action(data, roomID);
action.source.id = data.value("created_by_user_id").toString();
action.source.login = data.value("created_by").toString();
action.target.id = data.value("target_user_id").toString();
const auto args = data.value("args").toArray();
if (args.isEmpty())
{
return;
}
action.msgID = data.value("msg_id").toString();
if (action.msgID.isEmpty())
{
// Missing required msg_id parameter
return;
}
action.target.login = args[0].toString();
action.message = args[1].toString(); // May be omitted
action.reason = args[2].toString(); // May be omitted
this->moderation.autoModMessageBlocked.invoke(action);
};
*/
this->moderationActionHandlers["automod_message_rejected"] = this->moderationActionHandlers["automod_message_rejected"] =
[this](const auto &data, const auto &roomID) { [this](const auto &data, const auto &roomID) {
AutomodInfoAction action(data, roomID); AutomodInfoAction action(data, roomID);

View file

@ -7,7 +7,6 @@
#include "common/network/NetworkResult.hpp" #include "common/network/NetworkResult.hpp"
#include "common/Outcome.hpp" #include "common/Outcome.hpp"
#include "common/QLogging.hpp" #include "common/QLogging.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/api/Helix.hpp" #include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/TwitchAccount.hpp" #include "providers/twitch/TwitchAccount.hpp"
#include "providers/twitch/TwitchCommon.hpp" #include "providers/twitch/TwitchCommon.hpp"
@ -412,28 +411,20 @@ void TwitchAccountManager::refreshAccounts(bool emitChanged)
}) })
.onError([this, account](const auto &res) { .onError([this, account](const auto &res) {
auto json = res.parseJson(); auto json = res.parseJson();
QString message = u"Failed to refresh OAuth token for " % QString message =
account->getUserName() % u" (" % u"Failed to refresh OAuth token for " %
res.formatError() % u" - " % account->getUserName() % u" error: " % res.formatError() %
json["message"_L1].toString(u"no message"_s) % u" - " % json["message"_L1].toString(u"(no message)"_s);
u").";
qCWarning(chatterinoTwitch) << message; qCWarning(chatterinoTwitch) << message;
if (account == this->getCurrent()) if (account == this->getCurrent())
{ {
if (res.status().value_or(0) == 400) // invalid token if (res.status().value_or(0) == 400) // invalid token
{ {
auto msg = message +=
MessageBuilder::makeAccountExpiredMessage(message); QStringView(u". Consider re-adding your account.");
getApp()->getTwitch()->forEachChannel(
[msg](const auto &chan) {
chan->addMessage(msg, MessageContext::Original);
});
}
else
{
getApp()->getTwitch()->addGlobalSystemMessage(message);
} }
getApp()->getTwitch()->addGlobalSystemMessage(message);
} }
}) })
.finally(tryFlush) .finally(tryFlush)

View file

@ -291,7 +291,7 @@ void TwitchChannel::refreshTwitchChannelEmotesFor(
}; };
getHelix()->getFollowedChannel( getHelix()->getFollowedChannel(
account->getUserId(), this->roomId(), nullptr, account->getUserId(), this->roomId(),
[weak{this->weak_from_this()}, makeEmotes](const auto &chan) { [weak{this->weak_from_this()}, makeEmotes](const auto &chan) {
auto self = std::dynamic_pointer_cast<TwitchChannel>(weak.lock()); auto self = std::dynamic_pointer_cast<TwitchChannel>(weak.lock());
if (!self || !chan) if (!self || !chan)

View file

@ -507,7 +507,6 @@ void TwitchIrcServer::initialize()
action.msgID = msg.messageID; action.msgID = msg.messageID;
action.message = msg.messageText; action.message = msg.messageText;
action.reasonCode = msg.reason;
// this message also contains per-word automod data, which could be implemented // this message also contains per-word automod data, which could be implemented

View file

@ -3138,7 +3138,7 @@ void Helix::getUserEmotes(
} }
void Helix::getFollowedChannel( void Helix::getFollowedChannel(
QString userID, QString broadcasterID, const QObject *caller, QString userID, QString broadcasterID,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) FailureCallback<QString> failureCallback)
{ {
@ -3147,7 +3147,6 @@ void Helix::getFollowedChannel(
{u"user_id"_s, userID}, {u"user_id"_s, userID},
{u"broadcaster_id"_s, broadcasterID}, {u"broadcaster_id"_s, broadcasterID},
}) })
.caller(caller)
.onSuccess([successCallback](auto result) { .onSuccess([successCallback](auto result) {
if (result.status() != 200) if (result.status() != 200)
{ {

View file

@ -1143,7 +1143,7 @@ public:
/// https://dev.twitch.tv/docs/api/reference/#get-followed-channels /// https://dev.twitch.tv/docs/api/reference/#get-followed-channels
/// (non paginated) /// (non paginated)
virtual void getFollowedChannel( virtual void getFollowedChannel(
QString userID, QString broadcasterID, const QObject *caller, QString userID, QString broadcasterID,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) = 0; FailureCallback<QString> failureCallback) = 0;
@ -1486,7 +1486,7 @@ public:
/// https://dev.twitch.tv/docs/api/reference/#get-followed-channels /// https://dev.twitch.tv/docs/api/reference/#get-followed-channels
/// (non paginated) /// (non paginated)
void getFollowedChannel( void getFollowedChannel(
QString userID, QString broadcasterID, const QObject *caller, QString userID, QString broadcasterID,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) final; FailureCallback<QString> failureCallback) final;

View file

@ -15,10 +15,6 @@ PubSubAutoModQueueMessage::PubSubAutoModQueueMessage(const QJsonObject &root)
this->type = oType.value(); this->type = oType.value();
} }
this->reason =
qmagicenum::enumCast<Reason>(data.value("reason_code").toString())
.value_or(Reason::INVALID);
auto contentClassification = auto contentClassification =
data.value("content_classification").toObject(); data.value("content_classification").toObject();

View file

@ -13,24 +13,15 @@ struct PubSubAutoModQueueMessage {
INVALID, INVALID,
}; };
enum class Reason {
AutoMod,
BlockedTerm,
INVALID,
};
QString typeString; QString typeString;
Type type = Type::INVALID; Type type = Type::INVALID;
Reason reason = Reason::INVALID;
QJsonObject data; QJsonObject data;
QString status; QString status;
QString contentCategory; QString contentCategory;
int contentLevel{}; int contentLevel;
QString messageID; QString messageID;
QString messageText; QString messageText;
@ -60,20 +51,3 @@ constexpr magic_enum::customize::customize_t magic_enum::customize::enum_name<
return default_tag; return default_tag;
} }
} }
template <>
constexpr magic_enum::customize::customize_t magic_enum::customize::enum_name<
chatterino::PubSubAutoModQueueMessage::Reason>(
chatterino::PubSubAutoModQueueMessage::Reason value) noexcept
{
switch (value)
{
case chatterino::PubSubAutoModQueueMessage::Reason::AutoMod:
return "AutoModCaughtMessageReason";
case chatterino::PubSubAutoModQueueMessage::Reason::BlockedTerm:
return "BlockedTermCaughtMessageReason";
default:
return default_tag;
}
}

View file

@ -69,13 +69,6 @@ enum class ChatSendProtocol : int {
Helix = 2, Helix = 2,
}; };
enum class ShowModerationState : int {
// Always show this moderation-related item
Always = 0,
// Never show this moderation-related item
Never = 1,
};
enum StreamerModeSetting { enum StreamerModeSetting {
Disabled = 0, Disabled = 0,
Enabled = 1, Enabled = 1,
@ -352,10 +345,6 @@ public:
IntSetting timeoutStackStyle = { IntSetting timeoutStackStyle = {
"/moderation/timeoutStackStyle", "/moderation/timeoutStackStyle",
static_cast<int>(TimeoutStackStyle::Default)}; static_cast<int>(TimeoutStackStyle::Default)};
EnumStringSetting<ShowModerationState> showBlockedTermAutomodMessages = {
"/moderation/showBlockedTermAutomodMessages",
ShowModerationState::Always,
};
/// Highlighting /// Highlighting
// BoolSetting enableHighlights = {"/highlighting/enabled", true}; // BoolSetting enableHighlights = {"/highlighting/enabled", true};

View file

@ -140,8 +140,6 @@ WindowManager::WindowManager(const Paths &paths, Settings &settings,
this->forceLayoutChannelViewsListener.add(settings.enableRedeemedHighlight); this->forceLayoutChannelViewsListener.add(settings.enableRedeemedHighlight);
this->forceLayoutChannelViewsListener.add(settings.colorUsernames); this->forceLayoutChannelViewsListener.add(settings.colorUsernames);
this->forceLayoutChannelViewsListener.add(settings.boldUsernames); this->forceLayoutChannelViewsListener.add(settings.boldUsernames);
this->forceLayoutChannelViewsListener.add(
settings.showBlockedTermAutomodMessages);
this->layoutChannelViewsListener.add(settings.timestampFormat); this->layoutChannelViewsListener.add(settings.timestampFormat);
this->layoutChannelViewsListener.add(fonts.fontChanged); this->layoutChannelViewsListener.add(fonts.fontChanged);

View file

@ -41,7 +41,6 @@ DraggablePopup::DraggablePopup(bool closeAutomatically, QWidget *parent)
BaseWindow::ClearBuffersOnDpiChange, BaseWindow::ClearBuffersOnDpiChange,
parent) parent)
, lifetimeHack_(std::make_shared<bool>(false)) , lifetimeHack_(std::make_shared<bool>(false))
, closeAutomatically_(closeAutomatically)
, dragTimer_(this) , dragTimer_(this)
{ {
@ -129,14 +128,4 @@ Button *DraggablePopup::createPinButton()
return this->pinButton_; return this->pinButton_;
} }
bool DraggablePopup::ensurePinned()
{
if (this->closeAutomatically_ && !this->isPinned_)
{
this->togglePinned();
return true;
}
return false;
}
} // namespace chatterino } // namespace chatterino

View file

@ -38,18 +38,10 @@ protected:
// button pixmap // button pixmap
void togglePinned(); void togglePinned();
/// Ensures that this popup is pinned (if it's expected to close automatically)
///
/// @returns `true` if the popup was pinned as a result (i.e. if the popup
/// was unpinned and said to automatically close before)
bool ensurePinned();
private: private:
// isMoving_ is set to true if the user is holding the left mouse button down and has moved the mouse a small amount away from the original click point (startPosDrag_) // isMoving_ is set to true if the user is holding the left mouse button down and has moved the mouse a small amount away from the original click point (startPosDrag_)
bool isMoving_ = false; bool isMoving_ = false;
bool closeAutomatically_ = false;
// startPosDrag_ is the coordinates where the user originally pressed the mouse button down to start dragging // startPosDrag_ is the coordinates where the user originally pressed the mouse button down to start dragging
QPoint startPosDrag_; QPoint startPosDrag_;

View file

@ -204,7 +204,7 @@ void Notebook::duplicatePage(QWidget *page)
{ {
newTabPosition = tabPosition + 1; newTabPosition = tabPosition + 1;
} }
auto newTabHighlightState = item->tab->highlightState();
QString newTabTitle = ""; QString newTabTitle = "";
if (item->tab->hasCustomTitle()) if (item->tab->hasCustomTitle())
{ {
@ -213,7 +213,7 @@ void Notebook::duplicatePage(QWidget *page)
auto *tab = auto *tab =
this->addPageAt(newContainer, newTabPosition, newTabTitle, false); this->addPageAt(newContainer, newTabPosition, newTabTitle, false);
tab->copyHighlightStateAndSourcesFrom(item->tab); tab->setHighlightState(newTabHighlightState);
newContainer->setTab(tab); newContainer->setTab(tab);
} }

View file

@ -57,7 +57,7 @@ bool logInWithImplicitGrantCredentials(QWidget *parent, const QString &userID,
errors.append("Missing OAuth Token"); errors.append("Missing OAuth Token");
} }
if (!errors.empty()) if (errors.length() > 0)
{ {
QMessageBox messageBox(parent); QMessageBox messageBox(parent);
messageBox.setWindowTitle("Invalid account credentials"); messageBox.setWindowTitle("Invalid account credentials");

View file

@ -2,7 +2,6 @@
#include "Application.hpp" #include "Application.hpp"
#include "common/Channel.hpp" #include "common/Channel.hpp"
#include "common/Literals.hpp"
#include "common/network/NetworkRequest.hpp" #include "common/network/NetworkRequest.hpp"
#include "common/QLogging.hpp" #include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp" #include "controllers/accounts/AccountController.hpp"
@ -38,8 +37,6 @@
#include <QCheckBox> #include <QCheckBox>
#include <QDesktopServices> #include <QDesktopServices>
#include <QMessageBox>
#include <QMetaEnum>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QNetworkReply> #include <QNetworkReply>
#include <QPointer> #include <QPointer>
@ -144,8 +141,6 @@ int calculateTimeoutDuration(TimeoutButton timeout)
namespace chatterino { namespace chatterino {
using namespace literals;
UserInfoPopup::UserInfoPopup(bool closeAutomatically, Split *split) UserInfoPopup::UserInfoPopup(bool closeAutomatically, Split *split)
: DraggablePopup(closeAutomatically, split) : DraggablePopup(closeAutomatically, split)
, split_(split) , split_(split)
@ -628,72 +623,57 @@ void UserInfoPopup::installEvents()
return; return;
} }
if (newState == Qt::Unchecked) switch (newState)
{ {
this->ui_.block->setEnabled(false); case Qt::CheckState::Unchecked: {
this->ui_.block->setEnabled(false);
getApp()->getAccounts()->twitch.getCurrent()->unblockUser( getApp()->getAccounts()->twitch.getCurrent()->unblockUser(
this->userId_, this, this->userId_, this,
[this, reenableBlockCheckbox, currentUser] { [this, reenableBlockCheckbox, currentUser] {
this->channel_->addSystemMessage( this->channel_->addSystemMessage(
QString("You successfully unblocked user %1") QString("You successfully unblocked user %1")
.arg(this->userName_)); .arg(this->userName_));
reenableBlockCheckbox(); reenableBlockCheckbox();
}, },
[this, reenableBlockCheckbox] { [this, reenableBlockCheckbox] {
this->channel_->addSystemMessage( this->channel_->addSystemMessage(
QString("User %1 couldn't be unblocked, an unknown " QString(
"User %1 couldn't be unblocked, an unknown "
"error occurred!") "error occurred!")
.arg(this->userName_)); .arg(this->userName_));
reenableBlockCheckbox(); reenableBlockCheckbox();
}); });
return;
}
if (newState == Qt::Checked)
{
this->ui_.block->setEnabled(false);
bool wasPinned = this->ensurePinned();
auto btn = QMessageBox::warning(
this, u"Blocking " % this->userName_,
u"Blocking %1 can cause unintended side-effects like unfollowing.\n\n"_s
"Are you sure you want to block %1?".arg(this->userName_),
QMessageBox::Yes | QMessageBox::Cancel,
QMessageBox::Cancel);
if (wasPinned)
{
this->togglePinned();
} }
if (btn != QMessageBox::Yes) break;
{
reenableBlockCheckbox(); case Qt::CheckState::PartiallyChecked: {
QSignalBlocker blocker(this->ui_.block); // We deliberately ignore this state
this->ui_.block->setCheckState(Qt::Unchecked);
return;
} }
break;
getApp()->getAccounts()->twitch.getCurrent()->blockUser( case Qt::CheckState::Checked: {
this->userId_, this, this->ui_.block->setEnabled(false);
[this, reenableBlockCheckbox, currentUser] {
this->channel_->addSystemMessage( getApp()->getAccounts()->twitch.getCurrent()->blockUser(
QString("You successfully blocked user %1") this->userId_, this,
.arg(this->userName_)); [this, reenableBlockCheckbox, currentUser] {
reenableBlockCheckbox(); this->channel_->addSystemMessage(
}, QString("You successfully blocked user %1")
[this, reenableBlockCheckbox] { .arg(this->userName_));
this->channel_->addSystemMessage( reenableBlockCheckbox();
QString("User %1 couldn't be blocked, an " },
"unknown error occurred!") [this, reenableBlockCheckbox] {
.arg(this->userName_)); this->channel_->addSystemMessage(
reenableBlockCheckbox(); QString(
}); "User %1 couldn't be blocked, an unknown "
return; "error occurred!")
.arg(this->userName_));
reenableBlockCheckbox();
});
}
break;
} }
qCWarning(chatterinoWidget)
<< "Unexpected check-state when blocking" << this->userName_
<< QMetaEnum::fromType<Qt::CheckState>().valueToKey(newState);
}); });
// ignore highlights // ignore highlights

View file

@ -141,7 +141,7 @@ void QuickSwitcherPopup::updateSuggestions(const QString &text)
* Timeout interval 0 means the call will be delayed until all window events * Timeout interval 0 means the call will be delayed until all window events
* have been processed (cf. https://doc.qt.io/qt-5/qtimer.html#interval-prop). * have been processed (cf. https://doc.qt.io/qt-5/qtimer.html#interval-prop).
*/ */
QTimer::singleShot(0, this, [this] { QTimer::singleShot(0, [this] {
this->adjustSize(); this->adjustSize();
}); });
} }

View file

@ -474,8 +474,6 @@ bool ChannelView::paused() const
void ChannelView::pause(PauseReason reason, std::optional<uint> msecs) void ChannelView::pause(PauseReason reason, std::optional<uint> msecs)
{ {
bool wasUnpaused = !this->paused();
if (msecs) if (msecs)
{ {
/// Msecs has a value /// Msecs has a value
@ -506,11 +504,6 @@ void ChannelView::pause(PauseReason reason, std::optional<uint> msecs)
} }
this->updatePauses(); this->updatePauses();
if (wasUnpaused)
{
this->update();
}
} }
void ChannelView::unpause(PauseReason reason) void ChannelView::unpause(PauseReason reason)
@ -1071,8 +1064,6 @@ void ChannelView::setChannel(const ChannelPtr &underlyingChannel)
this->underlyingChannel_ = underlyingChannel; this->underlyingChannel_ = underlyingChannel;
this->updateID();
this->performLayout(); this->performLayout();
this->queueUpdate(); this->queueUpdate();
@ -1091,8 +1082,6 @@ void ChannelView::setChannel(const ChannelPtr &underlyingChannel)
void ChannelView::setFilters(const QList<QUuid> &ids) void ChannelView::setFilters(const QList<QUuid> &ids)
{ {
this->channelFilters_ = std::make_shared<FilterSet>(ids); this->channelFilters_ = std::make_shared<FilterSet>(ids);
this->updateID();
} }
QList<QUuid> ChannelView::getFilterIds() const QList<QUuid> ChannelView::getFilterIds() const
@ -3254,27 +3243,4 @@ void ChannelView::pendingLinkInfoStateChanged()
this->tooltipWidget_->applyLastBoundsCheck(); this->tooltipWidget_->applyLastBoundsCheck();
} }
void ChannelView::updateID()
{
if (!this->underlyingChannel_)
{
// cannot update
return;
}
std::size_t seed = 0;
auto first = qHash(this->underlyingChannel_->getName());
auto second = qHash(this->getFilterIds());
boost::hash_combine(seed, first);
boost::hash_combine(seed, second);
this->id_ = seed;
}
ChannelView::ChannelViewID ChannelView::getID() const
{
return this->id_;
}
} // namespace chatterino } // namespace chatterino

View file

@ -212,14 +212,6 @@ public:
Scrollbar *scrollbar(); Scrollbar *scrollbar();
using ChannelViewID = std::size_t;
///
/// \brief Get the ID of this ChannelView
///
/// The ID is made of the underlying channel's name
/// combined with the filter set IDs
ChannelViewID getID() const;
pajlada::Signals::Signal<QMouseEvent *> mouseDown; pajlada::Signals::Signal<QMouseEvent *> mouseDown;
pajlada::Signals::NoArgSignal selectionChanged; pajlada::Signals::NoArgSignal selectionChanged;
pajlada::Signals::Signal<HighlightState> tabHighlightRequested; pajlada::Signals::Signal<HighlightState> tabHighlightRequested;
@ -323,9 +315,6 @@ private:
void showReplyThreadPopup(const MessagePtr &message); void showReplyThreadPopup(const MessagePtr &message);
bool canReplyToMessages() const; bool canReplyToMessages() const;
void updateID();
ChannelViewID id_{};
bool layoutQueued_ = false; bool layoutQueued_ = false;
bool bufferInvalidationQueued_ = false; bool bufferInvalidationQueued_ = false;
@ -387,7 +376,7 @@ private:
FilterSetPtr channelFilters_; FilterSetPtr channelFilters_;
// Returns true if message should be included // Returns true if message should be included
bool shouldIncludeMessage(const MessagePtr &message) const; bool shouldIncludeMessage(const MessagePtr &m) const;
// Returns whether the scrollbar should have highlights // Returns whether the scrollbar should have highlights
bool showScrollbarHighlights() const; bool showScrollbarHighlights() const;

View file

@ -1,7 +1,6 @@
#include "widgets/helper/NotebookTab.hpp" #include "widgets/helper/NotebookTab.hpp"
#include "Application.hpp" #include "Application.hpp"
#include "common/Channel.hpp"
#include "common/Common.hpp" #include "common/Common.hpp"
#include "controllers/hotkeys/HotkeyCategory.hpp" #include "controllers/hotkeys/HotkeyCategory.hpp"
#include "controllers/hotkeys/HotkeyController.hpp" #include "controllers/hotkeys/HotkeyController.hpp"
@ -13,11 +12,9 @@
#include "widgets/dialogs/SettingsDialog.hpp" #include "widgets/dialogs/SettingsDialog.hpp"
#include "widgets/Notebook.hpp" #include "widgets/Notebook.hpp"
#include "widgets/splits/DraggedSplit.hpp" #include "widgets/splits/DraggedSplit.hpp"
#include "widgets/splits/Split.hpp"
#include "widgets/splits/SplitContainer.hpp" #include "widgets/splits/SplitContainer.hpp"
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#include <boost/container_hash/hash.hpp>
#include <QAbstractAnimation> #include <QAbstractAnimation>
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
@ -305,134 +302,10 @@ bool NotebookTab::isSelected() const
return this->selected_; return this->selected_;
} }
void NotebookTab::removeHighlightStateChangeSources(
const HighlightSources &toRemove)
{
for (const auto &[source, _] : toRemove)
{
this->removeHighlightSource(source);
}
}
void NotebookTab::removeHighlightSource(
const ChannelView::ChannelViewID &source)
{
this->highlightSources_.erase(source);
}
void NotebookTab::newHighlightSourceAdded(const ChannelView &channelViewSource)
{
auto channelViewId = channelViewSource.getID();
this->removeHighlightSource(channelViewId);
this->updateHighlightStateDueSourcesChange();
auto *splitNotebook = dynamic_cast<SplitNotebook *>(this->notebook_);
if (splitNotebook)
{
for (int i = 0; i < splitNotebook->getPageCount(); ++i)
{
auto *splitContainer =
dynamic_cast<SplitContainer *>(splitNotebook->getPageAt(i));
if (splitContainer)
{
auto *tab = splitContainer->getTab();
if (tab && tab != this)
{
tab->removeHighlightSource(channelViewId);
tab->updateHighlightStateDueSourcesChange();
}
}
}
}
}
void NotebookTab::updateHighlightStateDueSourcesChange()
{
if (std::ranges::any_of(this->highlightSources_, [](const auto &keyval) {
return keyval.second == HighlightState::Highlighted;
}))
{
assert(this->highlightState_ == HighlightState::Highlighted);
return;
}
if (std::ranges::any_of(this->highlightSources_, [](const auto &keyval) {
return keyval.second == HighlightState::NewMessage;
}))
{
if (this->highlightState_ != HighlightState::NewMessage)
{
this->highlightState_ = HighlightState::NewMessage;
this->update();
}
}
else
{
if (this->highlightState_ != HighlightState::None)
{
this->highlightState_ = HighlightState::None;
this->update();
}
}
assert(this->highlightState_ != HighlightState::Highlighted);
}
void NotebookTab::copyHighlightStateAndSourcesFrom(const NotebookTab *sourceTab)
{
if (this->isSelected())
{
assert(this->highlightSources_.empty());
assert(this->highlightState_ == HighlightState::None);
return;
}
this->highlightSources_ = sourceTab->highlightSources_;
if (!this->highlightEnabled_ &&
sourceTab->highlightState_ == HighlightState::NewMessage)
{
return;
}
if (this->highlightState_ == sourceTab->highlightState_ ||
this->highlightState_ == HighlightState::Highlighted)
{
return;
}
this->highlightState_ = sourceTab->highlightState_;
this->update();
}
void NotebookTab::setSelected(bool value) void NotebookTab::setSelected(bool value)
{ {
this->selected_ = value; this->selected_ = value;
if (value)
{
auto *splitNotebook = dynamic_cast<SplitNotebook *>(this->notebook_);
if (splitNotebook)
{
for (int i = 0; i < splitNotebook->getPageCount(); ++i)
{
auto *splitContainer =
dynamic_cast<SplitContainer *>(splitNotebook->getPageAt(i));
if (splitContainer)
{
auto *tab = splitContainer->getTab();
if (tab && tab != this)
{
tab->removeHighlightStateChangeSources(
this->highlightSources_);
tab->updateHighlightStateDueSourcesChange();
}
}
}
}
}
this->highlightSources_.clear();
this->highlightState_ = HighlightState::None; this->highlightState_ = HighlightState::None;
this->update(); this->update();
@ -485,22 +358,13 @@ bool NotebookTab::isLive() const
return this->isLive_; return this->isLive_;
} }
HighlightState NotebookTab::highlightState() const
{
return this->highlightState_;
}
void NotebookTab::setHighlightState(HighlightState newHighlightStyle) void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
{ {
if (this->isSelected()) if (this->isSelected())
{ {
assert(this->highlightSources_.empty());
assert(this->highlightState_ == HighlightState::None);
return; return;
} }
this->highlightSources_.clear();
if (!this->highlightEnabled_ && if (!this->highlightEnabled_ &&
newHighlightStyle == HighlightState::NewMessage) newHighlightStyle == HighlightState::NewMessage)
{ {
@ -517,79 +381,9 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
this->update(); this->update();
} }
void NotebookTab::updateHighlightState(HighlightState newHighlightStyle, HighlightState NotebookTab::highlightState() const
const ChannelView &channelViewSource)
{ {
if (this->isSelected()) return this->highlightState_;
{
assert(this->highlightSources_.empty());
assert(this->highlightState_ == HighlightState::None);
return;
}
if (!this->shouldMessageHighlight(channelViewSource))
{
return;
}
if (!this->highlightEnabled_ &&
newHighlightStyle == HighlightState::NewMessage)
{
return;
}
// message is highlighting unvisible tab
auto channelViewId = channelViewSource.getID();
switch (newHighlightStyle)
{
case HighlightState::Highlighted:
// override lower states
this->highlightSources_.insert_or_assign(channelViewId,
newHighlightStyle);
case HighlightState::NewMessage: {
// only insert if no state already there to avoid overriding
if (!this->highlightSources_.contains(channelViewId))
{
this->highlightSources_.emplace(channelViewId,
newHighlightStyle);
}
break;
}
case HighlightState::None:
break;
}
if (this->highlightState_ == newHighlightStyle ||
this->highlightState_ == HighlightState::Highlighted)
{
return;
}
this->highlightState_ = newHighlightStyle;
this->update();
}
bool NotebookTab::shouldMessageHighlight(
const ChannelView &channelViewSource) const
{
auto *visibleSplitContainer =
dynamic_cast<SplitContainer *>(this->notebook_->getSelectedPage());
if (visibleSplitContainer != nullptr)
{
const auto &visibleSplits = visibleSplitContainer->getSplits();
for (const auto &visibleSplit : visibleSplits)
{
if (channelViewSource.getID() ==
visibleSplit->getChannelView().getID())
{
return false;
}
}
}
return true;
} }
void NotebookTab::setHighlightsEnabled(const bool &newVal) void NotebookTab::setHighlightsEnabled(const bool &newVal)

View file

@ -2,7 +2,6 @@
#include "common/Common.hpp" #include "common/Common.hpp"
#include "widgets/helper/Button.hpp" #include "widgets/helper/Button.hpp"
#include "widgets/helper/ChannelView.hpp"
#include "widgets/Notebook.hpp" #include "widgets/Notebook.hpp"
#include <pajlada/settings/setting.hpp> #include <pajlada/settings/setting.hpp>
@ -60,25 +59,12 @@ public:
**/ **/
bool isLive() const; bool isLive() const;
/**
* @brief Sets the highlight state of this tab clearing highlight sources
*
* Obeys the HighlightsEnabled setting and highlight states hierarchy
*/
void setHighlightState(HighlightState style); void setHighlightState(HighlightState style);
/**
* @brief Updates the highlight state and highlight sources of this tab
*
* Obeys the HighlightsEnabled setting and the highlight state hierarchy and tracks the highlight state update sources
*/
void updateHighlightState(HighlightState style,
const ChannelView &channelViewSource);
void copyHighlightStateAndSourcesFrom(const NotebookTab *sourceTab);
void setHighlightsEnabled(const bool &newVal);
void newHighlightSourceAdded(const ChannelView &channelViewSource);
bool hasHighlightsEnabled() const;
HighlightState highlightState() const; HighlightState highlightState() const;
void setHighlightsEnabled(const bool &newVal);
bool hasHighlightsEnabled() const;
void moveAnimated(QPoint targetPos, bool animated = true); void moveAnimated(QPoint targetPos, bool animated = true);
QRect getDesiredRect() const; QRect getDesiredRect() const;
@ -121,16 +107,6 @@ private:
int normalTabWidthForHeight(int height) const; int normalTabWidthForHeight(int height) const;
bool shouldMessageHighlight(const ChannelView &channelViewSource) const;
using HighlightSources =
std::unordered_map<ChannelView::ChannelViewID, HighlightState>;
HighlightSources highlightSources_;
void removeHighlightStateChangeSources(const HighlightSources &toRemove);
void removeHighlightSource(const ChannelView::ChannelViewID &source);
void updateHighlightStateDueSourcesChange();
QPropertyAnimation positionChangedAnimation_; QPropertyAnimation positionChangedAnimation_;
QPoint positionAnimationDesiredPoint_; QPoint positionAnimationDesiredPoint_;

View file

@ -614,16 +614,12 @@ void GeneralPage::initLayout(GeneralPageView &layout)
"Google", "Google",
}, },
s.emojiSet); s.emojiSet);
layout.addCheckbox("Show BetterTTV global emotes", layout.addCheckbox("Show BTTV global emotes", s.enableBTTVGlobalEmotes);
s.enableBTTVGlobalEmotes); layout.addCheckbox("Show BTTV channel emotes", s.enableBTTVChannelEmotes);
layout.addCheckbox("Show BetterTTV channel emotes", layout.addCheckbox("Enable BTTV live emote updates (requires restart)",
s.enableBTTVChannelEmotes);
layout.addCheckbox("Enable BetterTTV live emote updates (requires restart)",
s.enableBTTVLiveUpdates); s.enableBTTVLiveUpdates);
layout.addCheckbox("Show FrankerFaceZ global emotes", layout.addCheckbox("Show FFZ global emotes", s.enableFFZGlobalEmotes);
s.enableFFZGlobalEmotes); layout.addCheckbox("Show FFZ channel emotes", s.enableFFZChannelEmotes);
layout.addCheckbox("Show FrankerFaceZ channel emotes",
s.enableFFZChannelEmotes);
layout.addCheckbox("Show 7TV global emotes", s.enableSevenTVGlobalEmotes); layout.addCheckbox("Show 7TV global emotes", s.enableSevenTVGlobalEmotes);
layout.addCheckbox("Show 7TV channel emotes", s.enableSevenTVChannelEmotes); layout.addCheckbox("Show 7TV channel emotes", s.enableSevenTVChannelEmotes);
layout.addCheckbox("Enable 7TV live emote updates (requires restart)", layout.addCheckbox("Enable 7TV live emote updates (requires restart)",
@ -1171,14 +1167,6 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addIntInput("Usercard scrollback limit (requires restart)", layout.addIntInput("Usercard scrollback limit (requires restart)",
s.scrollbackUsercardLimit, 100, 100000, 100); s.scrollbackUsercardLimit, 100, 100000, 100);
layout.addDropdownEnumClass<ShowModerationState>(
"Show blocked term automod messages",
qmagicenum::enumNames<ShowModerationState>(),
s.showBlockedTermAutomodMessages,
"Show messages that are blocked by AutoMod for containing a public "
"blocked term in the current channel.",
{});
layout.addDropdown<int>( layout.addDropdown<int>(
"Stack timeouts", {"Stack", "Stack until timeout", "Don't stack"}, "Stack timeouts", {"Stack", "Stack until timeout", "Don't stack"},
s.timeoutStackStyle, s.timeoutStackStyle,

View file

@ -214,21 +214,13 @@ void SplitContainer::addSplit(Split *split)
auto &&conns = this->connectionsPerSplit_[split]; auto &&conns = this->connectionsPerSplit_[split];
conns.managedConnect(split->getChannelView().tabHighlightRequested, conns.managedConnect(split->getChannelView().tabHighlightRequested,
[this, split](HighlightState state) { [this](HighlightState state) {
if (this->tab_ != nullptr) if (this->tab_ != nullptr)
{ {
this->tab_->updateHighlightState( this->tab_->setHighlightState(state);
state, split->getChannelView());
} }
}); });
conns.managedConnect(split->channelChanged, [this, split] {
if (this->tab_ != nullptr)
{
this->tab_->newHighlightSourceAdded(split->getChannelView());
}
});
conns.managedConnect(split->getChannelView().liveStatusChanged, [this]() { conns.managedConnect(split->getChannelView().liveStatusChanged, [this]() {
this->refreshTabLiveStatus(); this->refreshTabLiveStatus();
}); });

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ffff4500",
"userLoginName": "whoopiix",
"words": [ "words": [
"whoopiix" "whoopiix"
] ]

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ff00ff7f",
"userLoginName": "hyperbolicxd",
"words": [ "words": [
"hyperbolicxd" "hyperbolicxd"
] ]
@ -145,24 +142,6 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "quote_if_nam",
"words": [
"quote_if_nam"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -175,7 +154,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"!" "quote_if_nam!"
] ]
}, },
{ {

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ff0000ff",
"userLoginName": "byebyeheart",
"words": [ "words": [
"byebyeheart" "byebyeheart"
] ]

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ff0000ff",
"userLoginName": "tww2",
"words": [ "words": [
"TWW2" "TWW2"
] ]
@ -145,24 +142,6 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "mr_woodchuck",
"words": [
"Mr_Woodchuck"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -175,7 +154,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"!" "Mr_Woodchuck!"
] ]
} }
], ],

View file

@ -290,9 +290,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -300,9 +299,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ff008000",
"userLoginName": "ronni",
"words": [ "words": [
"ronni" "ronni"
] ]

View file

@ -217,24 +217,6 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "mohammadrezadh",
"words": [
"MohammadrezaDH"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -247,7 +229,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"!" "MohammadrezaDH!"
] ]
} }
], ],

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ffff8ea3",
"userLoginName": "inatsufn",
"words": [ "words": [
"iNatsuFN" "iNatsuFN"
] ]
@ -190,24 +187,6 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "kimmi_tm",
"words": [
"kimmi_tm"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -220,7 +199,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"!" "kimmi_tm!"
] ]
}, },
{ {

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ffeb078d",
"userLoginName": "lucidfoxx",
"words": [ "words": [
"Lucidfoxx" "Lucidfoxx"
] ]
@ -190,24 +187,6 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "ogprodigy",
"words": [
"OGprodigy"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -220,7 +199,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"!" "OGprodigy!"
] ]
} }
], ],

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ff0000ff",
"userLoginName": "calm__like_a_tom",
"words": [ "words": [
"calm__like_a_tom" "calm__like_a_tom"
] ]

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "System",
"userLoginName": "foly__",
"words": [ "words": [
"foly__" "foly__"
] ]

View file

@ -38,9 +38,8 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -48,9 +47,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ffcc00c2",
"userLoginName": "cspice",
"words": [ "words": [
"cspice" "cspice"
] ]
@ -161,9 +158,8 @@
] ]
}, },
{ {
"color": "Text", "color": "System",
"fallbackColor": "System", "flags": "Text",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -171,9 +167,7 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "MentionElement", "type": "TextElement",
"userColor": "#ffcc00c2",
"userLoginName": "cspice",
"words": [ "words": [
"cspice" "cspice"
] ]