updated translated-text to connectStatusText in ConnectionController

This commit is contained in:
ronoaer 2023-10-06 14:37:10 +08:00
parent 1357c4a309
commit 9377a0b545
4 changed files with 5 additions and 4 deletions

View file

@ -330,6 +330,8 @@ void AmneziaApplication::initControllers()
m_connectionController.reset(new ConnectionController(m_serversModel, m_containersModel, m_vpnConnection));
m_engine->rootContext()->setContextProperty("ConnectionController", m_connectionController.get());
connect(this, &AmneziaApplication::translationsUpdated, m_connectionController.get(), &ConnectionController::onTranslationsUpdated);
m_pageController.reset(new PageController(m_serversModel, m_settings));
m_engine->rootContext()->setContextProperty("PageController", m_pageController.get());

View file

@ -130,8 +130,9 @@ void ConnectionController::onCurrentContainerUpdated()
}
}
void ConnectionController::translateMemoryText()
void ConnectionController::onTranslationsUpdated()
{
// get translated text of current state
onConnectionStateChanged(getCurrentConnectionState());
}

View file

@ -34,7 +34,7 @@ public slots:
void onCurrentContainerUpdated();
void translateMemoryText();
void onTranslationsUpdated();
signals:
void connectToVpn(int serverIndex, const ServerCredentials &credentials, DockerContainer container,

View file

@ -171,8 +171,6 @@ PageType {
onClicked: {
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
ConnectionController.translateMemoryText()
}
}
TabImageButtonType {