Fix presets not filtered by configuration

This commit is contained in:
Davide 2024-10-26 20:49:01 +02:00
parent 61e8d8e2f7
commit 6d915f8985
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,7 @@ extension VPNFiltersView {
func load<C>( func load<C>(
with vpnManager: VPNProviderManager<C>, with vpnManager: VPNProviderManager<C>,
initialFilters: VPNFilters? initialFilters: VPNFilters?
) { ) where C: ProviderConfigurationIdentifiable {
categories = vpnManager categories = vpnManager
.allCategoryNames .allCategoryNames
.sorted() .sorted()
@ -77,6 +77,9 @@ extension VPNFiltersView {
presets = vpnManager presets = vpnManager
.allPresets .allPresets
.values .values
.filter {
$0.configurationIdentifier == C.providerConfigurationIdentifier
}
.sorted { .sorted {
$0.description < $1.description $0.description < $1.description
} }