I hate c++ and everything it stands for
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "twitchchannel.hpp"
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "twitch/twitchmessagebuilder.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
|
||||
#include <QThread>
|
||||
@@ -20,8 +21,6 @@ TwitchChannel::TwitchChannel(const QString &channelName)
|
||||
{
|
||||
debug::Log("[TwitchChannel:{}] Opened", this->name);
|
||||
|
||||
this->dontAddMessages = true;
|
||||
|
||||
this->reloadChannelEmotes();
|
||||
|
||||
this->liveStatusTimer = new QTimer;
|
||||
@@ -158,15 +157,22 @@ void TwitchChannel::fetchRecentMessages()
|
||||
static auto readConnection = singletons::IrcManager::getInstance().getReadConnection();
|
||||
|
||||
util::twitch::get(genericURL.arg(roomID), QThread::currentThread(), [=](QJsonObject obj) {
|
||||
this->dontAddMessages = false;
|
||||
auto msgArray = obj.value("messages").toArray();
|
||||
if (msgArray.size())
|
||||
if (msgArray.size() > 0) {
|
||||
std::vector<messages::SharedMessage> messages;
|
||||
messages.resize(msgArray.size());
|
||||
|
||||
for (int i = 0; i < msgArray.size(); i++) {
|
||||
QByteArray content = msgArray[i].toString().toUtf8();
|
||||
auto msg = Communi::IrcMessage::fromData(content, readConnection);
|
||||
auto privMsg = static_cast<Communi::IrcPrivateMessage *>(msg);
|
||||
singletons::IrcManager::getInstance().privateMessageReceived(privMsg);
|
||||
|
||||
messages::MessageParseArgs args;
|
||||
twitch::TwitchMessageBuilder builder(this, privMsg, args);
|
||||
messages.at(i) = builder.parse();
|
||||
}
|
||||
this->addMessagesAtStart(messages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "twitchmessagebuilder.hpp"
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/resourcemanager.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "singletons/ircmanager.hpp"
|
||||
#include "singletons/resourcemanager.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
#include "singletons/thememanager.hpp"
|
||||
#include "singletons/windowmanager.hpp"
|
||||
@@ -200,7 +200,8 @@ SharedMessage TwitchMessageBuilder::parse()
|
||||
|
||||
this->appendWord(Word(
|
||||
QString("x" + string.mid(5)), Word::BitsAmount, MessageColor(bitsColor),
|
||||
singletons::FontManager::Medium, QString(string.mid(5)), QString("Twitch Cheer"),
|
||||
singletons::FontManager::Medium, QString(string.mid(5)),
|
||||
QString("Twitch Cheer"),
|
||||
Link(Link::Url,
|
||||
QString("https://blog.twitch.tv/"
|
||||
"introducing-cheering-celebrate-together-da62af41fac6"))));
|
||||
@@ -230,13 +231,14 @@ SharedMessage TwitchMessageBuilder::parse()
|
||||
textColor = MessageColor(MessageColor::Link);
|
||||
}
|
||||
|
||||
this->appendWord(Word(string, Word::Text, textColor, singletons::FontManager::Medium, string,
|
||||
QString(), link));
|
||||
this->appendWord(Word(string, Word::Text, textColor,
|
||||
singletons::FontManager::Medium, string, QString(), link));
|
||||
} else { // is emoji
|
||||
this->appendWord(Word(emoteData.image, Word::EmojiImage, emoteData.image->getName(),
|
||||
emoteData.image->getTooltip()));
|
||||
Word(emoteData.image->getName(), Word::EmojiText, textColor, singletons::FontManager::Medium,
|
||||
emoteData.image->getName(), emoteData.image->getTooltip());
|
||||
Word(emoteData.image->getName(), Word::EmojiText, textColor,
|
||||
singletons::FontManager::Medium, emoteData.image->getName(),
|
||||
emoteData.image->getTooltip());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,7 +473,8 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
}
|
||||
|
||||
if (doAlert) {
|
||||
QApplication::alert(singletons::WindowManager::getInstance().getMainWindow().window(), 2500);
|
||||
QApplication::alert(singletons::WindowManager::getInstance().getMainWindow().window(),
|
||||
2500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -482,10 +485,11 @@ void TwitchMessageBuilder::appendModerationButtons()
|
||||
static QString buttonBanTooltip("Ban user");
|
||||
static QString buttonTimeoutTooltip("Timeout user");
|
||||
|
||||
this->appendWord(Word(singletons::ResourceManager::getInstance().buttonBan, Word::ButtonBan, QString(),
|
||||
buttonBanTooltip, Link(Link::UserBan, ircMessage->account())));
|
||||
this->appendWord(Word(singletons::ResourceManager::getInstance().buttonTimeout, Word::ButtonTimeout, QString(),
|
||||
buttonTimeoutTooltip, Link(Link::UserTimeout, ircMessage->account())));
|
||||
this->appendWord(Word(singletons::ResourceManager::getInstance().buttonBan, Word::ButtonBan,
|
||||
QString(), buttonBanTooltip, Link(Link::UserBan, ircMessage->account())));
|
||||
this->appendWord(Word(singletons::ResourceManager::getInstance().buttonTimeout,
|
||||
Word::ButtonTimeout, QString(), buttonTimeoutTooltip,
|
||||
Link(Link::UserTimeout, ircMessage->account())));
|
||||
}
|
||||
|
||||
void TwitchMessageBuilder::appendTwitchEmote(const Communi::IrcPrivateMessage *ircMessage,
|
||||
@@ -567,7 +571,8 @@ bool TwitchMessageBuilder::appendEmote(util::EmoteData &emoteData)
|
||||
|
||||
void TwitchMessageBuilder::parseTwitchBadges()
|
||||
{
|
||||
const auto &channelResources = singletons::ResourceManager::getInstance().channels[this->roomID];
|
||||
const auto &channelResources =
|
||||
singletons::ResourceManager::getInstance().channels[this->roomID];
|
||||
|
||||
auto iterator = this->tags.find("badges");
|
||||
|
||||
@@ -602,42 +607,43 @@ void TwitchMessageBuilder::parseTwitchBadges()
|
||||
Word(badgeVersion.badgeImage1x, Word::BadgeVanity, QString(),
|
||||
QString("Twitch " + QString::fromStdString(badgeVersion.title))));
|
||||
} catch (const std::exception &e) {
|
||||
debug::Log("Exception caught: {} when trying to fetch badge version {}",
|
||||
debug::Log("Exception caught: {} when trying to fetch badge version {} ",
|
||||
e.what(), versionKey);
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
debug::Log("No badge set with key bits. Exception: {}", e.what());
|
||||
}
|
||||
} else if (badge == "staff/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeStaff, Word::BadgeGlobalAuthority,
|
||||
QString(), QString("Twitch Staff")));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeStaff,
|
||||
Word::BadgeGlobalAuthority, QString(), QString("Twitch Staff")));
|
||||
} else if (badge == "admin/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeAdmin, Word::BadgeGlobalAuthority,
|
||||
QString(), QString("Twitch Admin")));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeAdmin,
|
||||
Word::BadgeGlobalAuthority, QString(), QString("Twitch Admin")));
|
||||
} else if (badge == "global_mod/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeGlobalModerator,
|
||||
Word::BadgeGlobalAuthority, QString(), QString("Global Moderator")));
|
||||
} else if (badge == "moderator/1") {
|
||||
// TODO: Implement custom FFZ moderator badge
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeModerator, Word::BadgeChannelAuthority,
|
||||
QString(),
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeModerator,
|
||||
Word::BadgeChannelAuthority, QString(),
|
||||
QString("Channel Moderator"))); // custom badge
|
||||
} else if (badge == "turbo/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeTurbo, Word::BadgeVanity, QString(),
|
||||
QString("Turbo Subscriber")));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeTurbo,
|
||||
Word::BadgeVanity, QString(), QString("Turbo Subscriber")));
|
||||
} else if (badge == "broadcaster/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeBroadcaster, Word::BadgeChannelAuthority,
|
||||
QString(), QString("Channel Broadcaster")));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeBroadcaster,
|
||||
Word::BadgeChannelAuthority, QString(),
|
||||
QString("Channel Broadcaster")));
|
||||
} else if (badge == "premium/1") {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgePremium, Word::BadgeVanity, QString(),
|
||||
QString("Twitch Prime")));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgePremium,
|
||||
Word::BadgeVanity, QString(), QString("Twitch Prime")));
|
||||
|
||||
} else if (badge.startsWith("partner/")) {
|
||||
int index = badge.midRef(8).toInt();
|
||||
switch (index) {
|
||||
case 1: {
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeVerified, Word::BadgeVanity,
|
||||
QString(), "Twitch Verified"));
|
||||
appendWord(Word(singletons::ResourceManager::getInstance().badgeVerified,
|
||||
Word::BadgeVanity, QString(), "Twitch Verified"));
|
||||
} break;
|
||||
default: {
|
||||
printf("[TwitchMessageBuilder] Unhandled partner badge index: %d\n", index);
|
||||
@@ -695,7 +701,8 @@ void TwitchMessageBuilder::parseTwitchBadges()
|
||||
std::string versionKey = parts[1].toStdString();
|
||||
|
||||
try {
|
||||
auto &badgeSet = singletons::ResourceManager::getInstance().badgeSets.at(badgeSetKey);
|
||||
auto &badgeSet =
|
||||
singletons::ResourceManager::getInstance().badgeSets.at(badgeSetKey);
|
||||
|
||||
try {
|
||||
auto &badgeVersion = badgeSet.versions.at(versionKey);
|
||||
|
||||
@@ -1,349 +0,0 @@
|
||||
//#include "twitchparsemessage.hpp"
|
||||
//#include "colorscheme.hpp"
|
||||
//#include "emojis.hpp"
|
||||
//#include "singletons/emotemanager.hpp"
|
||||
//#include "singletons/ircmanager.hpp"
|
||||
//#include "resources.hpp"
|
||||
//#include "twitch/twitchmessagebuilder.hpp"
|
||||
//
|
||||
//#include <QRegularExpression>
|
||||
//
|
||||
// using namespace chatterino::messages;
|
||||
//
|
||||
// namespace chatterino {
|
||||
// namespace twitch {
|
||||
// SharedMessage
|
||||
// twitchParseMessage(const Communi::IrcPrivateMessage *ircMessage,
|
||||
// Channel *channel, const MessageParseArgs &args)
|
||||
//{
|
||||
// TwitchMessageBuilder b;
|
||||
//
|
||||
// // timestamp
|
||||
// b.appendTimestamp();
|
||||
//
|
||||
// auto tags = ircMessage->tags();
|
||||
//
|
||||
// auto iterator = tags.find("id");
|
||||
//
|
||||
// if (iterator != tags.end()) {
|
||||
// b.messageId = iterator.value().toString();
|
||||
// }
|
||||
//
|
||||
// // timestamps
|
||||
// iterator = tags.find("tmi-sent-ts");
|
||||
//
|
||||
// // mod buttons
|
||||
// static QString buttonBanTooltip("Ban user");
|
||||
// static QString buttonTimeoutTooltip("Timeout user");
|
||||
//
|
||||
// b.appendWord(Word(Resources::getButtonBan(), Word::ButtonBan, QString(),
|
||||
// buttonBanTooltip,
|
||||
// Link(Link::UserBan, ircMessage->account())));
|
||||
// b.appendWord(Word(Resources::getButtonTimeout(), Word::ButtonTimeout,
|
||||
// QString(), buttonTimeoutTooltip,
|
||||
// Link(Link::UserTimeout, ircMessage->account())));
|
||||
//
|
||||
// // badges
|
||||
// iterator = tags.find("badges");
|
||||
//
|
||||
// if (iterator != tags.end()) {
|
||||
// auto badges = iterator.value().toString().split(',');
|
||||
//
|
||||
// b.appendTwitchBadges(badges);
|
||||
// }
|
||||
//
|
||||
// // color
|
||||
// QColor usernameColor = ColorScheme::getInstance().SystemMessageColor;
|
||||
//
|
||||
// iterator = tags.find("color");
|
||||
// if (iterator != tags.end()) {
|
||||
// usernameColor = QColor(iterator.value().toString());
|
||||
// }
|
||||
//
|
||||
// // channel name
|
||||
// if (args.includeChannelName) {
|
||||
// QString channelName("#" + channel->getName());
|
||||
// b.appendWord(
|
||||
// Word(channelName, Word::Misc,
|
||||
// ColorScheme::getInstance().SystemMessageColor,
|
||||
// QString(channelName), QString(),
|
||||
// Link(Link::Url, channel->getName() + "\n" + b.messageId)));
|
||||
// }
|
||||
//
|
||||
// // username
|
||||
// b.userName = ircMessage->nick();
|
||||
//
|
||||
// if (b.userName.isEmpty()) {
|
||||
// b.userName = tags.value(QLatin1String("login")).toString();
|
||||
// }
|
||||
//
|
||||
// QString displayName;
|
||||
//
|
||||
// iterator = tags.find("display-name");
|
||||
// if (iterator == tags.end()) {
|
||||
// displayName = ircMessage->account();
|
||||
// } else {
|
||||
// displayName = iterator.value().toString();
|
||||
// }
|
||||
//
|
||||
// bool hasLocalizedName =
|
||||
// QString::compare(displayName, ircMessage->account()) == 0;
|
||||
// QString userDisplayString =
|
||||
// displayName +
|
||||
// (hasLocalizedName ? (" (" + ircMessage->account() + ")") : QString());
|
||||
//
|
||||
// if (args.isSentWhisper) {
|
||||
// userDisplayString +=
|
||||
// IrcManager::getInstance().getUser().getUserName() + " -> ";
|
||||
// }
|
||||
//
|
||||
// if (args.isReceivedWhisper) {
|
||||
// userDisplayString +=
|
||||
// " -> " + IrcManager::getInstance().getUser().getUserName();
|
||||
// }
|
||||
//
|
||||
// if (!ircMessage->isAction()) {
|
||||
// userDisplayString += ": ";
|
||||
// }
|
||||
//
|
||||
// b.appendWord(Word(userDisplayString, Word::Username, usernameColor,
|
||||
// userDisplayString, QString()));
|
||||
//
|
||||
// // highlights
|
||||
// // TODO: implement this xD
|
||||
//
|
||||
// // bits
|
||||
// QString bits = "";
|
||||
//
|
||||
// iterator = tags.find("bits");
|
||||
// if (iterator != tags.end()) {
|
||||
// bits = iterator.value().toString();
|
||||
// }
|
||||
//
|
||||
// // twitch emotes
|
||||
// std::vector<std::pair<long int, LazyLoadedImage *>> twitchEmotes;
|
||||
//
|
||||
// iterator = tags.find("emotes");
|
||||
//
|
||||
// if (iterator != tags.end()) {
|
||||
// auto emotes = iterator.value().toString().split('/');
|
||||
//
|
||||
// for (QString emote : emotes) {
|
||||
// if (!emote.contains(':'))
|
||||
// continue;
|
||||
//
|
||||
// QStringList parameters = emote.split(':');
|
||||
//
|
||||
// if (parameters.length() < 2)
|
||||
// continue;
|
||||
//
|
||||
// long int id = std::stol(parameters.at(0).toStdString(), nullptr, 10);
|
||||
//
|
||||
// QStringList occurences = parameters.at(1).split(',');
|
||||
//
|
||||
// for (QString occurence : occurences) {
|
||||
// QStringList coords = occurence.split('-');
|
||||
//
|
||||
// if (coords.length() < 2)
|
||||
// continue;
|
||||
//
|
||||
// long int start =
|
||||
// std::stol(coords.at(0).toStdString(), nullptr, 10);
|
||||
// long int end = std::stol(coords.at(1).toStdString(), nullptr,
|
||||
// 10);
|
||||
//
|
||||
// if (start >= end || start < 0 ||
|
||||
// end > ircMessage->content().length())
|
||||
// continue;
|
||||
//
|
||||
// QString name =
|
||||
// ircMessage->content().mid(start, end - start + 1);
|
||||
//
|
||||
// twitchEmotes.push_back(std::pair<long int, LazyLoadedImage *>(
|
||||
// start,
|
||||
// EmoteManager::getInstance().getTwitchEmoteById(name,
|
||||
// id)));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// std::sort(twitchEmotes.begin(), twitchEmotes.end(), sortTwitchEmotes);
|
||||
// }
|
||||
//
|
||||
// auto currentTwitchEmote = twitchEmotes.begin();
|
||||
//
|
||||
// // words
|
||||
// QColor textColor = ircMessage->isAction() ? usernameColor
|
||||
// :
|
||||
// ColorScheme::getInstance().Text;
|
||||
//
|
||||
// QStringList splits = ircMessage->content().split(' ');
|
||||
//
|
||||
// long int i = 0;
|
||||
//
|
||||
// for (QString split : splits) {
|
||||
// // twitch emote
|
||||
// if (currentTwitchEmote != twitchEmotes.end() &&
|
||||
// currentTwitchEmote->first == i) {
|
||||
// b.appendWord(Word(currentTwitchEmote->second,
|
||||
// Word::TwitchEmoteImage,
|
||||
// currentTwitchEmote->second->getName(),
|
||||
// currentTwitchEmote->second->getName() +
|
||||
// QString("\nTwitch Emote")));
|
||||
// b.appendWord(Word(currentTwitchEmote->second->getName(),
|
||||
// Word::TwitchEmoteText, textColor,
|
||||
// currentTwitchEmote->second->getName(),
|
||||
// currentTwitchEmote->second->getName() +
|
||||
// QString("\nTwitch Emote")));
|
||||
//
|
||||
// i += split.length() + 1;
|
||||
// currentTwitchEmote = std::next(currentTwitchEmote);
|
||||
//
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // split words
|
||||
// std::vector<std::tuple<LazyLoadedImage *, QString>> parsed;
|
||||
//
|
||||
// Emojis::parseEmojis(parsed, split);
|
||||
//
|
||||
// for (const std::tuple<LazyLoadedImage *, QString> &tuple : parsed) {
|
||||
// LazyLoadedImage *image = std::get<0>(tuple);
|
||||
//
|
||||
// if (image == nullptr) { // is text
|
||||
// QString string = std::get<1>(tuple);
|
||||
//
|
||||
// static QRegularExpression cheerRegex("cheer[1-9][0-9]*");
|
||||
//
|
||||
// // cheers
|
||||
// if (!bits.isEmpty() && string.length() >= 6 &&
|
||||
// cheerRegex.match(string).isValid()) {
|
||||
// auto cheer = string.mid(5).toInt();
|
||||
//
|
||||
// QString color;
|
||||
//
|
||||
// QColor bitsColor;
|
||||
//
|
||||
// if (cheer >= 10000) {
|
||||
// color = "red";
|
||||
// bitsColor = QColor::fromHslF(0, 1, 0.5);
|
||||
// } else if (cheer >= 5000) {
|
||||
// color = "blue";
|
||||
// bitsColor = QColor::fromHslF(0.61, 1, 0.4);
|
||||
// } else if (cheer >= 1000) {
|
||||
// color = "green";
|
||||
// bitsColor = QColor::fromHslF(0.5, 1, 0.5);
|
||||
// } else if (cheer >= 100) {
|
||||
// color = "purple";
|
||||
// bitsColor = QColor::fromHslF(0.8, 1, 0.5);
|
||||
// } else {
|
||||
// color = "gray";
|
||||
// bitsColor = QColor::fromHslF(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
//
|
||||
// QString bitsLinkAnimated = QString(
|
||||
// "http://static-cdn.jtvnw.net/bits/dark/animated/" +
|
||||
// color + "/1");
|
||||
// QString bitsLink = QString(
|
||||
// "http://static-cdn.jtvnw.net/bits/dark/static/" +
|
||||
// color + "/1");
|
||||
//
|
||||
// LazyLoadedImage *imageAnimated =
|
||||
// EmoteManager::getInstance()
|
||||
// .getMiscImageFromCache()
|
||||
// .getOrAdd(bitsLinkAnimated, [&bitsLinkAnimated] {
|
||||
// return new LazyLoadedImage(bitsLinkAnimated);
|
||||
// });
|
||||
// LazyLoadedImage *image =
|
||||
// EmoteManager::getInstance()
|
||||
// .getMiscImageFromCache()
|
||||
// .getOrAdd(bitsLink, [&bitsLink] {
|
||||
// return new LazyLoadedImage(bitsLink);
|
||||
// });
|
||||
//
|
||||
// b.appendWord(
|
||||
// Word(imageAnimated, Word::BitsAnimated,
|
||||
// QString("cheer"), QString("Twitch Cheer"),
|
||||
// Link(Link::Url,
|
||||
// QString("https://blog.twitch.tv/"
|
||||
// "introducing-cheering-celebrate-"
|
||||
// "together-da62af41fac6"))));
|
||||
// b.appendWord(
|
||||
// Word(image, Word::BitsStatic, QString("cheer"),
|
||||
// QString("Twitch Cheer"),
|
||||
// Link(Link::Url,
|
||||
// QString("https://blog.twitch.tv/"
|
||||
// "introducing-cheering-celebrate-"
|
||||
// "together-da62af41fac6"))));
|
||||
//
|
||||
// b.appendWord(
|
||||
// Word(QString("x" + string.mid(5)), Word::BitsAmount,
|
||||
// bitsColor, QString(string.mid(5)),
|
||||
// QString("Twitch Cheer"),
|
||||
// Link(Link::Url,
|
||||
// QString("https://blog.twitch.tv/"
|
||||
// "introducing-cheering-celebrate-"
|
||||
// "together-da62af41fac6"))));
|
||||
//
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // bttv / ffz emotes
|
||||
// LazyLoadedImage *bttvEmote;
|
||||
//
|
||||
// // TODO: Implement this (ignored emotes)
|
||||
// if (EmoteManager::getInstance().getBttvEmotes().tryGet(
|
||||
// string, bttvEmote) ||
|
||||
// channel->getBttvChannelEmotes().tryGet(string, bttvEmote)
|
||||
// ||
|
||||
// EmoteManager::getInstance().getFfzEmotes().tryGet(
|
||||
// string, bttvEmote) ||
|
||||
// channel->getFfzChannelEmotes().tryGet(string, bttvEmote)
|
||||
// ||
|
||||
// EmoteManager::getInstance().getChatterinoEmotes().tryGet(
|
||||
// string, bttvEmote)) {
|
||||
// b.appendWord(Word(bttvEmote, Word::BttvEmoteImage,
|
||||
// bttvEmote->getName(),
|
||||
// bttvEmote->getTooltip(),
|
||||
// Link(Link::Url, bttvEmote->getUrl())));
|
||||
//
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // actually just a word
|
||||
// QString link = b.matchLink(string);
|
||||
//
|
||||
// b.appendWord(
|
||||
// Word(string, Word::Text, textColor, string, QString(),
|
||||
// link.isEmpty() ? Link() : Link(Link::Url, link)));
|
||||
// } else { // is emoji
|
||||
// static QString emojiTooltip("Emoji");
|
||||
//
|
||||
// b.appendWord(Word(image, Word::EmojiImage, image->getName(),
|
||||
// emojiTooltip));
|
||||
// Word(image->getName(), Word::EmojiText, textColor,
|
||||
// image->getName(), emojiTooltip);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// i += split.length() + 1;
|
||||
// }
|
||||
//
|
||||
// // TODO: Implement this xD
|
||||
// // if (!isReceivedWhisper &&
|
||||
// // AppSettings.HighlightIgnoredUsers.ContainsKey(Username))
|
||||
// // {
|
||||
// // HighlightTab = false;
|
||||
// // }
|
||||
//
|
||||
// return b.build();
|
||||
//}
|
||||
//
|
||||
// bool
|
||||
// sortTwitchEmotes(const std::pair<long int, LazyLoadedImage *> &a,
|
||||
// const std::pair<long int, LazyLoadedImage *> &b)
|
||||
//{
|
||||
// return a.first < b.first;
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//
|
||||
@@ -1,13 +0,0 @@
|
||||
//#ifndef MESSAGEPARSER_H
|
||||
//#define MESSAGEPARSER_H
|
||||
//
|
||||
//#include "messages/lazyloadedimage.hpp"
|
||||
//#include "messages/messagebuilder.hpp"
|
||||
//#include "messages/messageparseargs.hpp"
|
||||
//
|
||||
// namespace chatterino {
|
||||
// namespace twitch {
|
||||
//}
|
||||
//}
|
||||
//
|
||||
//#endif // MESSAGEPARSER_H
|
||||
Reference in New Issue
Block a user