mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
fix: various fixes (#2662)
* fix: fixed dns processing * fix: fixed proceesed index/id selection * refactor: stop using the server index as state * fix: fixed autostart and start minimized * fix: fixed typo * fix: add socks5 extractConfigFromContainer * fix: remove unused currentContainerUpdated * fix: fixed clear cached profile order
This commit is contained in:
@@ -17,7 +17,7 @@ import "../Config"
|
||||
ListViewType {
|
||||
id: root
|
||||
|
||||
property int selectedIndex: ServersUiController.defaultServerIndex
|
||||
property int selectedIndex: ServersUiController.getServerIndexById(ServersUiController.defaultServerId)
|
||||
|
||||
anchors.top: serversMenuHeader.bottom
|
||||
anchors.right: parent.right
|
||||
@@ -29,8 +29,8 @@ ListViewType {
|
||||
|
||||
Connections {
|
||||
target: ServersUiController
|
||||
function onDefaultServerIndexChanged() {
|
||||
root.selectedIndex = ServersUiController.defaultServerIndex
|
||||
function onDefaultServerIdChanged() {
|
||||
root.selectedIndex = ServersUiController.getServerIndexById(ServersUiController.defaultServerId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,14 +106,14 @@ ListViewType {
|
||||
z: 1
|
||||
|
||||
onClicked: function() {
|
||||
ServersUiController.processedServerIndex = index
|
||||
ServersUiController.setProcessedServerId(serverId)
|
||||
|
||||
if (ServersModel.getProcessedServerData("isServerFromGatewayApi")) {
|
||||
if (ServersModel.getProcessedServerData("isCountrySelectionAvailable")) {
|
||||
if (ServersUiController.isServerFromApi(ServersUiController.processedServerId)) {
|
||||
if (ServersUiController.isServerCountrySelectionAvailable(ServersUiController.processedServerId)) {
|
||||
PageController.goToPage(PageEnum.PageSettingsApiAvailableCountries)
|
||||
} else {
|
||||
PageController.showBusyIndicator(true)
|
||||
let result = SubscriptionUiController.getAccountInfo(ServersUiController.getServerId(ServersUiController.processedServerIndex), false)
|
||||
let result = SubscriptionUiController.getAccountInfo(ServersUiController.processedServerId, false)
|
||||
PageController.showBusyIndicator(false)
|
||||
if (!result) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user