1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 06:45:45 +02:00

lrcinstance: avoid to call getAccountList continuously

Change-Id: Ia8ecf2aa61c3e1725949ec1e2e4cb9aae33c0982
Gitlab: #46
This commit is contained in:
Sébastien Blin 2020-08-31 10:16:35 -04:00
parent dc25dfa904
commit ba8bf74561

View file

@ -259,8 +259,9 @@ public:
static const QString &
getCurrAccId()
{
if (instance().selectedAccountId_.isEmpty()) {
auto accountList = accountModel().getAccountList();
if (instance().selectedAccountId_.isEmpty() && accountList.size()) {
if (accountList.size())
instance().selectedAccountId_ = accountList.at(0);
}
return instance().selectedAccountId_;