Commit 97c4c2dc authored by Olivier SOLDANO's avatar Olivier SOLDANO Committed by Anthony Léonard

manage case of no account enabled for searchbar

hides the search bar in case of the user has disabled all
its accounts to avoid the case that searching anything
makes it a SIP contact method.

It also clears the ID field displayed in the welcome page.

Change-Id: I86e299a7dc35f65f8dc05761cd1afecb3f9d84c2
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 9b7e80d9
......@@ -690,6 +690,9 @@ CallWidget::selectedAccountChanged(const QModelIndex &current, const QModelIndex
Q_UNUSED(previous)
if (current.isValid()) {
if (ui->selectBar->isHidden()){
ui->selectBar->show();
}
auto ac = current.data(static_cast<int>(Account::Role::Object)).value<Account*>();
// First, we get back to the welcome view (except if in call)
......@@ -729,6 +732,9 @@ CallWidget::selectedAccountChanged(const QModelIndex &current, const QModelIndex
// keep call on foreground
callStateToView(actualCall_);
}
} else {
ui->selectBar->hide();
ui->ringIdLabel->setText("");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment