General cleanups/reformats
- Clean up imports - Comment EmojiData - Reorder TwitchAccount constructor - Fix typo in TwitchChannel - Add emoji parsing test code at the bottom of EmoteManager
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#include "providers/twitch/twitchaccount.hpp"
|
||||
#include "const.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace providers {
|
||||
namespace twitch {
|
||||
|
||||
TwitchAccount::TwitchAccount(const QString &_username, const QString &_oauthToken,
|
||||
const QString &_oauthClient)
|
||||
: userName(_username)
|
||||
, oauthClient(_oauthClient)
|
||||
: oauthClient(_oauthClient)
|
||||
, oauthToken(_oauthToken)
|
||||
, userName(_username)
|
||||
, _isAnon(_username == ANONYMOUS_USERNAME)
|
||||
{
|
||||
}
|
||||
@@ -65,6 +65,7 @@ bool TwitchAccount::isAnon() const
|
||||
{
|
||||
return this->_isAnon;
|
||||
}
|
||||
|
||||
} // namespace twitch
|
||||
} // namespace providers
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
namespace chatterino {
|
||||
namespace providers {
|
||||
namespace twitch {
|
||||
|
||||
class TwitchAccount
|
||||
{
|
||||
public:
|
||||
@@ -37,6 +38,7 @@ private:
|
||||
QString userName;
|
||||
const bool _isAnon;
|
||||
};
|
||||
|
||||
} // namespace twitch
|
||||
} // namespace providers
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -25,7 +25,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
||||
, channelURL("https://twitch.tv/" + name)
|
||||
, popoutPlayerURL("https://player.twitch.tv/?channel=" + name)
|
||||
, mod(false)
|
||||
, readConnecetion(_readConnection)
|
||||
, readConnection(_readConnection)
|
||||
{
|
||||
debug::Log("[TwitchChannel:{}] Opened", this->name);
|
||||
|
||||
@@ -285,7 +285,7 @@ void TwitchChannel::fetchRecentMessages()
|
||||
auto channel = dynamic_cast<TwitchChannel *>(shared.get());
|
||||
assert(channel != nullptr);
|
||||
|
||||
static auto readConnection = channel->readConnecetion;
|
||||
static auto readConnection = channel->readConnection;
|
||||
|
||||
QJsonArray msgArray = obj.value("messages").toArray();
|
||||
if (msgArray.empty()) {
|
||||
|
||||
@@ -95,7 +95,7 @@ private:
|
||||
QByteArray messageSuffix;
|
||||
QString lastSentMessage;
|
||||
|
||||
Communi::IrcConnection *readConnecetion;
|
||||
Communi::IrcConnection *readConnection;
|
||||
|
||||
friend class TwitchServer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user