mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-04 03:43:46 +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
@@ -146,6 +146,10 @@ char const *kRenderAltitudeImagesQueueLabel = "mapsme.mwmrouter.renderAltitudeIm
|
||||
_canAutoAddLastLocation = YES;
|
||||
_routingOptions = [MWMRoutingOptions new];
|
||||
_isRestoreProcessCompleted = NO;
|
||||
|
||||
[NSNotificationCenter.defaultCenter addObserverForName:@"RoutingOptionsChanged" object:nil queue:nil usingBlock:^(NSNotification * _Nonnull notification) {
|
||||
[MWMRouter updateRoute];
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -570,7 +574,7 @@ char const *kRenderAltitudeImagesQueueLabel = "mapsme.mwmrouter.renderAltitudeIm
|
||||
|
||||
+ (void)updateRoute {
|
||||
MWMRoutingOptions *newOptions = [MWMRoutingOptions new];
|
||||
if ((self.isRoutingActive && !self.isOnRoute) && ![newOptions isEqual:[self router].routingOptions]) {
|
||||
if (self.isRoutingActive && !self.isOnRoute && ![newOptions isEqual:[self router].routingOptions]) {
|
||||
[self rebuildWithBestRouter:YES];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user