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
Tags nightly/20230523.0
No related merge requests found
......@@ -259,9 +259,10 @@ public:
static const QString &
getCurrAccId()
{
auto accountList = accountModel().getAccountList();
if (instance().selectedAccountId_.isEmpty() && accountList.size()) {
instance().selectedAccountId_ = accountList.at(0);
if (instance().selectedAccountId_.isEmpty()) {
auto accountList = accountModel().getAccountList();
if (accountList.size())
instance().selectedAccountId_ = accountList.at(0);
}
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