Added support for handling a location coming in from the a places user activity inside the "processUserActivity: animated: completion:" function in the WMFAppViewController view controller.
This commit is contained in:
parent
f9c5cbb2c3
commit
327cb880c5
@ -1187,10 +1187,16 @@ NSString *const WMFLanguageVariantAlertsLibraryVersion = @"WMFLanguageVariantAle
|
|||||||
[self setSelectedIndex:WMFAppTabTypePlaces];
|
[self setSelectedIndex:WMFAppTabTypePlaces];
|
||||||
[self.navigationController popToRootViewControllerAnimated:animated];
|
[self.navigationController popToRootViewControllerAnimated:animated];
|
||||||
NSURL *articleURL = activity.wmf_linkURL;
|
NSURL *articleURL = activity.wmf_linkURL;
|
||||||
if (articleURL) {
|
CLLocation *locationFromURL = activity.wmf_locationFromURL;
|
||||||
|
if (articleURL || locationFromURL) {
|
||||||
// For "View on a map" action to succeed, view mode has to be set to map.
|
// For "View on a map" action to succeed, view mode has to be set to map.
|
||||||
[[self placesViewController] updateViewModeToMap];
|
[[self placesViewController] updateViewModeToMap];
|
||||||
[[self placesViewController] showArticleURL:articleURL];
|
if (locationFromURL) {
|
||||||
|
[[self placesViewController] centerMapOnLocation:locationFromURL];
|
||||||
|
}
|
||||||
|
else if (articleURL) {
|
||||||
|
[[self placesViewController] showArticleURL:articleURL];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case WMFUserActivityTypeContent: {
|
case WMFUserActivityTypeContent: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user