Skip to content
Snippets Groups Projects
Commit ba8bf745 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

lrcinstance: avoid to call getAccountList continuously

Change-Id: Ia8ecf2aa61c3e1725949ec1e2e4cb9aae33c0982
Gitlab: #46
parent dc25dfa9
No related branches found
No related tags found
No related merge requests found
...@@ -259,9 +259,10 @@ public: ...@@ -259,9 +259,10 @@ public:
static const QString & static const QString &
getCurrAccId() getCurrAccId()
{ {
auto accountList = accountModel().getAccountList(); if (instance().selectedAccountId_.isEmpty()) {
if (instance().selectedAccountId_.isEmpty() && accountList.size()) { auto accountList = accountModel().getAccountList();
instance().selectedAccountId_ = accountList.at(0); if (accountList.size())
instance().selectedAccountId_ = accountList.at(0);
} }
return instance().selectedAccountId_; return instance().selectedAccountId_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment