diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index e470f69c5..949b253c5 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -6,9 +6,9 @@ #include "controllers/ignores/IgnoreController.hpp" #include "debug/Log.hpp" #include "messages/Message.hpp" +#include "providers/LinkResolver.hpp" #include "providers/twitch/TwitchBadges.hpp" #include "providers/twitch/TwitchChannel.hpp" -#include "providers/LinkResolver.hpp" #include "singletons/Emotes.hpp" #include "singletons/Resources.hpp" #include "singletons/Settings.hpp" @@ -269,12 +269,15 @@ void TwitchMessageBuilder::addTextOrEmoji(const QString &string_) link = Link(Link::Url, linkString); textColor = MessageColor(MessageColor::Link); - auto linkMELowercase = this->emplace(lowercaseLinkString, - MessageElementFlag::LowercaseLink, textColor) - ->setLink(link); - auto linkMEOriginal = this->emplace(string, - MessageElementFlag::OriginalLink, textColor) - ->setLink(link); + auto linkMELowercase = + this->emplace(lowercaseLinkString, + MessageElementFlag::LowercaseLink, + textColor) + ->setLink(link); + auto linkMEOriginal = + this->emplace(string, MessageElementFlag::OriginalLink, + textColor) + ->setLink(link); LinkResolver::getLinkInfo( linkString, [linkMELowercase, linkMEOriginal](QString tooltipText) { diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 6d84c0b7e..2f0606ae3 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -84,7 +84,8 @@ void SplitInput::initLayout() })); // open emote popup - QObject::connect(this->ui_.emoteButton, &EffectLabel::clicked, [=] { this->openEmotePopup(); }); + QObject::connect(this->ui_.emoteButton, &EffectLabel::clicked, + [=] { this->openEmotePopup(); }); // clear channelview selection when selecting in the input QObject::connect(this->ui_.textEdit, &QTextEdit::copyAvailable, @@ -180,7 +181,8 @@ void SplitInput::installKeyPressedEvent() c->sendMessage(sendMessage); // don't add duplicate messages and empty message to message history - if ((this->prevMsg_.isEmpty() || !this->prevMsg_.endsWith(message)) && + if ((this->prevMsg_.isEmpty() || + !this->prevMsg_.endsWith(message)) && !message.trimmed().isEmpty()) this->prevMsg_.append(message); @@ -189,7 +191,8 @@ void SplitInput::installKeyPressedEvent() this->currMsg_ = QString(); this->ui_.textEdit->setText(QString()); this->prevIndex_ = 0; - } else if (message == this->prevMsg_.at(this->prevMsg_.size() - 1)) { + } else if (message == + this->prevMsg_.at(this->prevMsg_.size() - 1)) { this->prevMsg_.removeLast(); } this->prevIndex_ = this->prevMsg_.size(); @@ -248,14 +251,15 @@ void SplitInput::installKeyPressedEvent() // Then simply get currMsg_. this->ui_.textEdit->setText(this->currMsg_); } else if (message != this->currMsg_) { - // If user are already in current message + // If user are already in current message // And type something new // Then replace currMsg_ with new one. this->currMsg_ = message; } // If user is already in current message // Then don't touch cursos. - cursorToEnd = (message == this->prevMsg_.at(this->prevIndex_ - 1)); + cursorToEnd = + (message == this->prevMsg_.at(this->prevIndex_ - 1)); } if (cursorToEnd) {