diff options
author | Andrew Dolgov <[email protected]> | 2013-05-22 11:57:54 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-22 11:57:54 -0700 |
commit | 5554b5c2543feb7bd42d61e39745e8584ac01cc9 (patch) | |
tree | be992aac71c3340d39acab73b14b6e5186824a2d /src | |
parent | d3e355e83b16085c74e11bd2404e631bdaad09dd (diff) | |
parent | 9081e4d5530da442872b49c161e18ecab2c70e8c (diff) |
Merge pull request #38 from lhw/fixofflinefragment
fix offline fragment
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/offline/OfflineArticleFragment.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/org/fox/ttrss/offline/OfflineArticleFragment.java b/src/org/fox/ttrss/offline/OfflineArticleFragment.java index b1093517..7e53ca57 100644 --- a/src/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -1,5 +1,7 @@ package org.fox.ttrss.offline; +import java.net.URI; +import java.net.URL; import java.text.SimpleDateFormat; import java.util.Date; @@ -125,9 +127,11 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector. @Override public void onClick(View v) { try { - Intent intent = new Intent(Intent.ACTION_VIEW, - Uri.parse(link.trim())); - startActivity(intent); + URL url = new URL(link.trim()); + String uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), + url.getPort(), url.getPath(), url.getQuery(), url.getRef()).toString(); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); + startActivity(intent); } catch (Exception e) { e.printStackTrace(); m_activity.toast(R.string.error_other_error); |