mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[ios] Added recalculate route on route option changes
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
728d0ad806
commit
19e1c4b90e
@@ -4,6 +4,10 @@ import Combine
|
||||
@objc class Settings: NSObject {
|
||||
// MARK: Properties
|
||||
|
||||
// The notification name for changed routing options
|
||||
static let routingOptionsChangedNotificationName: Notification.Name = Notification.Name(rawValue: "RoutingOptionsChanged")
|
||||
|
||||
|
||||
/// Key for storing if the sync beta alert has been shown in the user defaults
|
||||
static private let userDefaultsKeyHasShownSyncBetaAlert = "kUDDidShowICloudSynchronizationEnablingAlert"
|
||||
|
||||
@@ -352,6 +356,8 @@ import Combine
|
||||
let routingOptions = RoutingOptions()
|
||||
routingOptions.avoidToll = newValue
|
||||
routingOptions.save()
|
||||
|
||||
NotificationCenter.default.post(name: routingOptionsChangedNotificationName, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,6 +371,8 @@ import Combine
|
||||
let routingOptions = RoutingOptions()
|
||||
routingOptions.avoidDirty = newValue
|
||||
routingOptions.save()
|
||||
|
||||
NotificationCenter.default.post(name: routingOptionsChangedNotificationName, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,6 +386,8 @@ import Combine
|
||||
let routingOptions = RoutingOptions()
|
||||
routingOptions.avoidFerry = newValue
|
||||
routingOptions.save()
|
||||
|
||||
NotificationCenter.default.post(name: routingOptionsChangedNotificationName, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,6 +401,8 @@ import Combine
|
||||
let routingOptions = RoutingOptions()
|
||||
routingOptions.avoidMotorway = newValue
|
||||
routingOptions.save()
|
||||
|
||||
NotificationCenter.default.post(name: routingOptionsChangedNotificationName, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user