This commit is contained in:
manuroe
2016-04-26 17:55:37 +02:00
parent f91ddac917
commit 1fd18aa727
2 changed files with 19 additions and 1 deletions
+18 -1
View File
@@ -1309,8 +1309,25 @@
}];
}];
[self.currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_event_action_permalink", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf cancelEventSelection];
// Create a permalink that is common to all Vector.im clients
// FIXME: When available, use the prod Vector web app URL
NSString *webAppUrl = [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlDev"];
NSString *permalink = [NSString stringWithFormat:@"%@/#/room/%@/%@",
webAppUrl,
selectedEvent.roomId,
selectedEvent.eventId];
[[UIPasteboard generalPasteboard] setString:permalink];
}];
}
self.currentAlert.cancelButtonIndex = [self.currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"cancel", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
__strong __typeof(weakSelf)strongSelf = weakSelf;