Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with auto-detected links not opening. #601

Merged
merged 2 commits into from
Jan 22, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/ProMotion/web/web_screen_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ def open_in_safari(inRequest)

# UIWebViewDelegate Methods - Camelcase
def webView(inWeb, shouldStartLoadWithRequest:inRequest, navigationType:inType)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicky, but could you rename these to in_request and in_type for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been like that for a long time and NOW you're complaining?!

Sheesh!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have left well enough alone! lol

if self.external_links == true && inType == UIWebViewNavigationTypeLinkClicked
if defined?(OpenInChromeController)
open_in_chrome inRequest
else
open_in_safari inRequest
if %w(http https).include?(inRequest.URL.scheme)
if self.external_links == true && inType == UIWebViewNavigationTypeLinkClicked
if defined?(OpenInChromeController)
open_in_chrome inRequest
else
open_in_safari inRequest
end
return false # don't allow the web view to load the link.
end
return false #don't allow the web view to load the link.
end

load_request_enable = true #return true on default for local file loading.
Expand Down