Server selection always in range (#130)

* Server selection stays always in the list's range
* Removed the usage of QZxing module from PageQrDecoder page
* Fixed null spelling on qml instead of nil
This commit is contained in:
Hamza ARBI 2022-12-12 13:28:03 +01:00 committed by GitHub
parent 814b66c04a
commit f20f528a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 8 deletions

View file

@ -15,6 +15,7 @@ void ServerListLogic::onServerListPushbuttonDefaultClicked(int index)
{
m_settings->setDefaultServer(index);
uiLogic()->onUpdateAllPages();
emit currServerIdxChanged();
}
void ServerListLogic::onServerListPushbuttonSettingsClicked(int index)
@ -23,6 +24,11 @@ void ServerListLogic::onServerListPushbuttonSettingsClicked(int index)
uiLogic()->goToPage(Page::ServerSettings);
}
int ServerListLogic::currServerIdx() const
{
return m_settings->defaultServerIndex();
}
void ServerListLogic::onUpdatePage()
{
const QJsonArray &servers = m_settings->serversArray();