Signed-off-by: Michael Schuster <michael@schuster.ms>
return _apps;
}
+AccountApp* AccountState::findApp(const QString &appId) const
+{
+ if(!appId.isEmpty()) {
+ foreach(AccountApp *app, appList()) {
+ if(app->id() == appId)
+ return app;
+ }
+ }
+
+ return nullptr;
+}
+
/*-------------------------------------------------------------------------------------*/
AccountApp::AccountApp(const QString &name, const QUrl &url,
bool hasTalk() const;
AccountAppList appList() const;
+ AccountApp* findApp(const QString &appId) const;
/** A user-triggered sign out which disconnects, stops syncs
* for the account and forgets the password. */