added debug logs and code to assert that we are in the gui thread
This commit is contained in:
@@ -69,7 +69,7 @@ void AbstractIrcServer::connect()
|
||||
}
|
||||
|
||||
this->onConnected();
|
||||
this->connected.invoke();
|
||||
// this->connected.invoke();
|
||||
}
|
||||
|
||||
void AbstractIrcServer::disconnect()
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace providers {
|
||||
namespace twitch {
|
||||
|
||||
TwitchAccountManager::TwitchAccountManager()
|
||||
: anonymousUser(new TwitchAccount(ANONYMOUS_USERNAME, "", "", ""))
|
||||
{
|
||||
this->anonymousUser.reset(new TwitchAccount(ANONYMOUS_USERNAME, "", "", ""));
|
||||
}
|
||||
|
||||
std::shared_ptr<TwitchAccount> TwitchAccountManager::getCurrent()
|
||||
|
||||
@@ -21,9 +21,10 @@ TwitchServer::TwitchServer()
|
||||
, mentionsChannel(new Channel("/mentions", Channel::TwitchMentions))
|
||||
, watchingChannel(Channel::getEmpty(), Channel::TwitchWatching)
|
||||
{
|
||||
AccountManager::getInstance().Twitch.userChanged.connect([this]() { //
|
||||
util::postToThread([this] { this->connect(); });
|
||||
});
|
||||
qDebug() << "init TwitchServer";
|
||||
|
||||
AccountManager::getInstance().Twitch.userChanged.connect(
|
||||
[this]() { util::postToThread([this] { this->connect(); }); });
|
||||
}
|
||||
|
||||
TwitchServer &TwitchServer::getInstance()
|
||||
@@ -36,6 +37,8 @@ void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
|
||||
{
|
||||
std::shared_ptr<TwitchAccount> account = AccountManager::getInstance().Twitch.getCurrent();
|
||||
|
||||
qDebug() << "logging in as" << account->getUserName();
|
||||
|
||||
QString username = account->getUserName();
|
||||
// QString oauthClient = account->getOAuthClient();
|
||||
QString oauthToken = account->getOAuthToken();
|
||||
|
||||
Reference in New Issue
Block a user