fix offline fragment
This commit is contained in:
parent
d3e355e83b
commit
9081e4d553
@ -1,5 +1,7 @@
|
|||||||
package org.fox.ttrss.offline;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URL;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -125,9 +127,11 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW,
|
URL url = new URL(link.trim());
|
||||||
Uri.parse(link.trim()));
|
String uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(),
|
||||||
startActivity(intent);
|
url.getPort(), url.getPath(), url.getQuery(), url.getRef()).toString();
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
|
||||||
|
startActivity(intent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
m_activity.toast(R.string.error_other_error);
|
m_activity.toast(R.string.error_other_error);
|
||||||
|
Loading…
Reference in New Issue
Block a user