Fixed regression on opening of normal web links.

Removed the dev logs
This commit is contained in:
manuroe
2016-05-03 11:05:47 +02:00
parent 0341872f09
commit 8c3b8ffec8
2 changed files with 2 additions and 10 deletions
-6
View File
@@ -65,23 +65,17 @@
{
BOOL isUniversalLink = NO;
NSLog(@"#### isUniversalLink. url.host: %@", url.host);
if ([url.host isEqualToString:@"vector.im"] || [url.host isEqualToString:@"www.vector.im"])
{
// iOS Patch: fix vector.im urls before using it
NSURL *fixedURL = [Tools fixURLWithSeveralHashKeys:url];
NSLog(@"#### isUniversalLink. Fixed url: %@", fixedURL);
if (NSNotFound != [@[@"/app", @"/staging", @"/beta", @"/develop"] indexOfObject:fixedURL.path])
{
isUniversalLink = YES;
}
}
NSLog(@"#### isUniversalLink. Result: %@", @(isUniversalLink));
return isUniversalLink;
}
+2 -4
View File
@@ -1375,17 +1375,15 @@
// Try to catch universal link supported by the app
NSURL *url = userInfo[kMXKRoomBubbleCellUrl];
NSLog(@"#### shouldDoAction. url: %@", url);
// If the link can be open it by the app, let it do
if ([Tools isUniversalLink:url])
{
shouldDoAction = NO;
// iOS Patch: fix vector.im urls before using it
url = [Tools fixURLWithSeveralHashKeys:url];
NSURL *fixedURL = [Tools fixURLWithSeveralHashKeys:url];
[[AppDelegate theDelegate] handleUniversalLinkFragment:url.fragment];
[[AppDelegate theDelegate] handleUniversalLinkFragment:fixedURL.fragment];
}
}