Merge pull request #207 from amnezia-vpn/bugfix/add-server-with-same-credentials

bugfix/add-server-with-same-credentials
This commit is contained in:
pokamest 2023-04-05 01:50:11 +01:00 committed by GitHub
commit 3fb34e28a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 20 deletions

View file

@ -68,7 +68,7 @@ void AdvancedServerSettingsLogic::onPushButtonScanServerClicked()
bool isServerCreated;
auto containersCount = m_settings->containers(uiLogic()->m_selectedServerIndex).size();
ErrorCode errorCode = uiLogic()->addAlreadyInstalledContainersGui(false, isServerCreated);
ErrorCode errorCode = uiLogic()->addAlreadyInstalledContainersGui(isServerCreated);
if (errorCode != ErrorCode::NoError) {
emit uiLogic()->showWarningMessage(tr("Error occurred while scanning the server.") + "\n" +
tr("Error message: ") + errorString(errorCode) + "\n" +

View file

@ -4,9 +4,7 @@
#include <QApplication>
#include "protocols/CloakLogic.h"
#include "protocols/OpenVpnLogic.h"
#include "protocols/ShadowSocksLogic.h"
#include "protocols/PageProtocolLogicBase.h"
#include "core/servercontroller.h"
#include <functional>
@ -90,7 +88,7 @@ void ServerContainersLogic::onPushButtonContinueClicked(DockerContainer c, int p
qApp->processEvents();
bool isServerCreated = false;
ErrorCode errorCode = uiLogic()->addAlreadyInstalledContainersGui(false, isServerCreated);
ErrorCode errorCode = uiLogic()->addAlreadyInstalledContainersGui(isServerCreated);
if (errorCode == ErrorCode::NoError) {
if (!uiLogic()->isContainerAlreadyAddedToGui(c)) {