From 962ffdf678e253b5cfc9e6be0e5f1cd8257e2df3 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 15 Nov 2024 00:24:22 +0100 Subject: [PATCH] Sort servers by .serverId in repository --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 3 +-- Passepartout/Library/Package.swift | 4 ++-- .../Domain/VPNServerParameters+CoreData.swift | 4 ++-- .../AppUIMain/Views/Provider/VPNProviderServerView.swift | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Passepartout.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Passepartout.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f4b7839c..f748ed03 100644 --- a/Passepartout.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Passepartout.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -41,8 +41,7 @@ "kind" : "remoteSourceControl", "location" : "git@github.com:passepartoutvpn/passepartoutkit-source", "state" : { - "revision" : "3a4c78af67dfe181acc657a5539ee3d62d1c9361", - "version" : "0.11.0" + "revision" : "d74cd0f02ba844beff2be55bf5f93796a3c43a6d" } }, { diff --git a/Passepartout/Library/Package.swift b/Passepartout/Library/Package.swift index 39c48d74..a1e8d052 100644 --- a/Passepartout/Library/Package.swift +++ b/Passepartout/Library/Package.swift @@ -43,8 +43,8 @@ let package = Package( ) ], dependencies: [ - .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.11.0"), -// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "3a4c78af67dfe181acc657a5539ee3d62d1c9361"), +// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.11.0"), + .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "d74cd0f02ba844beff2be55bf5f93796a3c43a6d"), // .package(path: "../../../passepartoutkit-source"), .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.9.1"), // .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"), diff --git a/Passepartout/Library/Sources/AppDataProviders/Domain/VPNServerParameters+CoreData.swift b/Passepartout/Library/Sources/AppDataProviders/Domain/VPNServerParameters+CoreData.swift index 5fbc030a..f75ba2c7 100644 --- a/Passepartout/Library/Sources/AppDataProviders/Domain/VPNServerParameters+CoreData.swift +++ b/Passepartout/Library/Sources/AppDataProviders/Domain/VPNServerParameters+CoreData.swift @@ -49,8 +49,8 @@ extension VPNSortField { case .area: return NSSortDescriptor(key: "area", ascending: true) - case .hostname: - return NSSortDescriptor(key: "hostname", ascending: true) + case .serverId: + return NSSortDescriptor(key: "serverId", ascending: true) } } } diff --git a/Passepartout/Library/Sources/AppUIMain/Views/Provider/VPNProviderServerView.swift b/Passepartout/Library/Sources/AppUIMain/Views/Provider/VPNProviderServerView.swift index aa8d1b38..3387bc07 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/Provider/VPNProviderServerView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/Provider/VPNProviderServerView.swift @@ -50,7 +50,7 @@ struct VPNProviderServerView: View where Configuration: ProviderC private var vpnManager = VPNProviderManager(sorting: [ .localizedCountry, .area, - .hostname + .serverId ]) @StateObject