NOISSUE make newly added account be the default one if there's no default yet

This commit is contained in:
Petr Mrázek 2025-01-15 04:06:36 +01:00
parent 43f59f2d91
commit a484024b9e

View File

@ -600,10 +600,12 @@ void AccountsDialog::onLoginTaskSucceeded()
{
m_loginTask = nullptr;
QModelIndex index = m_accounts->addAccount(m_loginAccount);
if (m_accounts->count() == 2) {
m_accounts->setDefaultAccount(m_loginAccount);
}
ui->accountListView->selectionModel()->select(index, selectionFlags);
if(!m_accounts->defaultAccount())
{
m_accounts->setData(index, Qt::Checked, Qt::CheckStateRole);
}
m_loginAccount = nullptr;
}