mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
fix crashes on devices without a browser app
This commit is contained in:
parent
49ed884778
commit
a2c4a8738d
2 changed files with 10 additions and 2 deletions
|
@ -352,7 +352,11 @@ public abstract class Reading extends NbActivity implements OnPageChangeListener
|
|||
} else if (item.getItemId() == R.id.menu_reading_original) {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(story.permalink));
|
||||
startActivity(i);
|
||||
try {
|
||||
startActivity(i);
|
||||
} catch (Exception e) {
|
||||
android.util.Log.wtf(this.getClass().getName(), "device cannot open URLs");
|
||||
}
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.menu_reading_sharenewsblur) {
|
||||
DialogFragment newFragment = ShareDialogFragment.newInstance(story, readingAdapter.getSourceUserId());
|
||||
|
|
|
@ -251,7 +251,11 @@ public class ReadingItemFragment extends NbFragment implements ClassifierDialogF
|
|||
public void onClick(DialogInterface dialog, int id) {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(finalURL));
|
||||
startActivity(i);
|
||||
try {
|
||||
startActivity(i);
|
||||
} catch (Exception e) {
|
||||
android.util.Log.wtf(this.getClass().getName(), "device cannot open URLs");
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.alert_dialog_done, new DialogInterface.OnClickListener() {
|
||||
|
|
Loading…
Add table
Reference in a new issue