From 78a8c3cfc42afa1bf4f17c1ef3fe8dffe66e5765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Lindstr=C3=B6m?= Date: Fri, 13 Apr 2012 09:06:26 +0200 Subject: [PATCH] Initial syncstate removal on userchange --- src/accounts/spotify/SpotifyAccount.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/accounts/spotify/SpotifyAccount.cpp b/src/accounts/spotify/SpotifyAccount.cpp index efe321956..736d9f9a3 100644 --- a/src/accounts/spotify/SpotifyAccount.cpp +++ b/src/accounts/spotify/SpotifyAccount.cpp @@ -355,6 +355,17 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg else JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( QString( "Spotify: %1" ).arg( error ) ) ); } + else if( msgType == "userChanged" ) + { + const QString rmsg = msg.value( "msg" ).toString(); + //const QString olduser = msg.value( "oldUser" ).toString(); + //const QString newuser = msg.value( "newUser" ).toString(); + if( rmsg.isEmpty() ) + return; + /// @todo: actually remove sync states for old user.... + + JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( QString( "Spotify: %1" ).arg( rmsg ) ) ); + } }