mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
reformat
This commit is contained in:
parent
afeb7e719b
commit
d16307a484
2 changed files with 19 additions and 12 deletions
|
@ -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<TextElement>(lowercaseLinkString,
|
||||
MessageElementFlag::LowercaseLink, textColor)
|
||||
->setLink(link);
|
||||
auto linkMEOriginal = this->emplace<TextElement>(string,
|
||||
MessageElementFlag::OriginalLink, textColor)
|
||||
->setLink(link);
|
||||
auto linkMELowercase =
|
||||
this->emplace<TextElement>(lowercaseLinkString,
|
||||
MessageElementFlag::LowercaseLink,
|
||||
textColor)
|
||||
->setLink(link);
|
||||
auto linkMEOriginal =
|
||||
this->emplace<TextElement>(string, MessageElementFlag::OriginalLink,
|
||||
textColor)
|
||||
->setLink(link);
|
||||
|
||||
LinkResolver::getLinkInfo(
|
||||
linkString, [linkMELowercase, linkMEOriginal](QString tooltipText) {
|
||||
|
|
|
@ -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();
|
||||
|
@ -255,7 +258,8 @@ void SplitInput::installKeyPressedEvent()
|
|||
}
|
||||
// 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) {
|
||||
|
|
Loading…
Reference in a new issue