mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 20:44:25 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
39
iphone/Maps/Classes/Share/MWMEditorViralActivityItem.mm
Normal file
39
iphone/Maps/Classes/Share/MWMEditorViralActivityItem.mm
Normal file
@@ -0,0 +1,39 @@
|
||||
#import "MWMEditorViralActivityItem.h"
|
||||
|
||||
#include "platform/preferred_languages.hpp"
|
||||
|
||||
@implementation MWMEditorViralActivityItem
|
||||
|
||||
#pragma mark - UIActivityItemSource
|
||||
|
||||
- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (id)activityViewController:(UIActivityViewController *)activityViewController
|
||||
itemForActivityType:(NSString *)activityType
|
||||
{
|
||||
if ([activityType isEqualToString:UIActivityTypePostToFacebook] ||
|
||||
[activityType isEqualToString:@"com.facebook.Facebook.ShareExtension"] ||
|
||||
[activityType.lowercaseString rangeOfString:@"facebook"].length)
|
||||
{
|
||||
NSString * url = [NSString stringWithFormat:@"https://omaps.app/fb-editor-v1?lang=%@",
|
||||
@(languages::GetCurrentNorm().c_str())];
|
||||
return [NSURL URLWithString:url];
|
||||
}
|
||||
|
||||
NSString * omapsURL = @"https://omaps.app/get";
|
||||
if ([activityType isEqualToString:UIActivityTypePostToTwitter] || [activityType isEqualToString:UIActivityTypeMail])
|
||||
return [NSString stringWithFormat:@"%@ %@", L(@"whatsnew_editor_message_1"), omapsURL];
|
||||
|
||||
return [NSString stringWithFormat:@"%@.\n%@\n%@", L(@"editor_sharing_title"), L(@"whatsnew_editor_message_1"), omapsURL];
|
||||
}
|
||||
|
||||
- (NSString *)activityViewController:(UIActivityViewController *)activityViewController
|
||||
subjectForActivityType:(NSString *)activityType
|
||||
{
|
||||
return L(@"editor_sharing_title");
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user