mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing crash when url is not http[s] and using in app Safari.
This commit is contained in:
parent
5438b54955
commit
500d4edae6
1 changed files with 7 additions and 0 deletions
|
@ -2264,6 +2264,13 @@
|
|||
- (void)showSafariViewControllerWithURL:(NSURL *)url useReader:(BOOL)useReader {
|
||||
SFSafariViewControllerConfiguration *config = [SFSafariViewControllerConfiguration new];
|
||||
config.entersReaderIfAvailable = useReader;
|
||||
|
||||
NSRange prefix = [[url absoluteString] rangeOfString: @"http"];
|
||||
if (NSNotFound == prefix.location) {
|
||||
[self informError:@"URL scheme invalid"];
|
||||
return;
|
||||
}
|
||||
|
||||
self.safariViewController = [[SFSafariViewController alloc] initWithURL:url configuration:config];
|
||||
self.safariViewController.delegate = self;
|
||||
[self.storyPagesViewController setNavigationBarHidden:NO];
|
||||
|
|
Loading…
Add table
Reference in a new issue