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:
Rasmus Karlsson
2018-03-31 13:44:15 +02:00
committed by fourtf
parent c382fdc528
commit 964e1f249a
17 changed files with 118 additions and 64 deletions
+4 -3
View File
@@ -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
+2
View File
@@ -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
+2 -2
View File
@@ -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()) {
+1 -1
View File
@@ -95,7 +95,7 @@ private:
QByteArray messageSuffix;
QString lastSentMessage;
Communi::IrcConnection *readConnecetion;
Communi::IrcConnection *readConnection;
friend class TwitchServer;