1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-15 10:33:59 +02:00

Make sure to hook up newly added account's connectionStateChanged

This commit is contained in:
Leo Franchi
2012-08-15 16:15:31 -04:00
parent 159dd35322
commit 3efb32cac8
2 changed files with 5 additions and 4 deletions

View File

@@ -135,13 +135,13 @@ TwitterAccount::authenticateSlot()
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
}
}
if ( m_isAuthenticating )
{
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Already authenticating";
return;
}
tDebug() << Q_FUNC_INFO << "credentials: " << credentials().keys();
if ( credentials()[ "oauthtoken" ].toString().isEmpty() || credentials()[ "oauthtokensecret" ].toString().isEmpty() )
@@ -165,7 +165,7 @@ void
TwitterAccount::deauthenticate()
{
tDebug() << Q_FUNC_INFO;
if ( m_twitterSipPlugin )
sipPlugin()->disconnectPlugin();
@@ -174,7 +174,7 @@ TwitterAccount::deauthenticate()
m_isAuthenticated = false;
m_isAuthenticating = false;
emit nowDeauthenticated();
}

View File

@@ -415,6 +415,7 @@ AccountManager::hookupAndEnable( Account* account, bool startup )
if ( p )
SipHandler::instance()->hookUpPlugin( p );
hookupAccount( account );
if ( account->enabled() )
{
account->authenticate();