mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
refactor: deactivate api config before remove (#2569)
Co-authored-by: vkamn <vk@amnezia.org>
This commit is contained in:
@@ -406,6 +406,15 @@ void SubscriptionUiController::removeApiConfig(const QString &serverId)
|
||||
emit apiConfigRemoved(tr("Api config removed"));
|
||||
}
|
||||
|
||||
void SubscriptionUiController::removeServer(const QString &serverId)
|
||||
{
|
||||
const QString serverName = m_serversController->notificationDisplayName(serverId);
|
||||
if (!m_subscriptionController->removeServer(serverId)) {
|
||||
return;
|
||||
}
|
||||
emit apiServerRemoved(tr("Server '%1' was removed").arg(serverName));
|
||||
}
|
||||
|
||||
|
||||
QList<QString> SubscriptionUiController::getQrCodes()
|
||||
{
|
||||
|
||||
@@ -58,6 +58,8 @@ public slots:
|
||||
|
||||
void removeApiConfig(const QString &serverId);
|
||||
|
||||
void removeServer(const QString &serverId);
|
||||
|
||||
bool getAccountInfo(const QString &serverId, bool reload);
|
||||
void getRenewalLink(const QString &serverId);
|
||||
|
||||
@@ -78,6 +80,7 @@ signals:
|
||||
void subscriptionRefreshNeeded();
|
||||
|
||||
void apiConfigRemoved(const QString &message);
|
||||
void apiServerRemoved(const QString &message);
|
||||
|
||||
void vpnKeyExportReady();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user