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,8 +259,9 @@ public: ...@@ -259,8 +259,9 @@ public:
static const QString & static const QString &
getCurrAccId() getCurrAccId()
{ {
if (instance().selectedAccountId_.isEmpty()) {
auto accountList = accountModel().getAccountList(); auto accountList = accountModel().getAccountList();
if (instance().selectedAccountId_.isEmpty() && accountList.size()) { if (accountList.size())
instance().selectedAccountId_ = accountList.at(0); 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.
Please register or to comment