mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Open image link
This commit is contained in:
parent
29da42bb9f
commit
3f46eeb339
1 changed files with 5 additions and 4 deletions
|
@ -3857,12 +3857,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private void onOpenImage(long id, @NonNull String source) {
|
||||
Log.i("Viewing image source=" + source);
|
||||
|
||||
Uri uri = Uri.parse(source);
|
||||
ImageHelper.AnnotatedSource annotated = new ImageHelper.AnnotatedSource(source);
|
||||
Uri uri = Uri.parse(annotated.getSource());
|
||||
String scheme = uri.getScheme();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("id", id);
|
||||
args.putString("source", source);
|
||||
args.putString("source", annotated.getSource());
|
||||
args.putInt("zoom", zoom);
|
||||
|
||||
if ("cid".equals(scheme))
|
||||
|
@ -3890,7 +3891,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}.execute(context, owner, args, "view:cid");
|
||||
|
||||
else if ("http".equals(scheme) || "https".equals(scheme))
|
||||
Helper.view(context, uri, false);
|
||||
onOpenLink(uri, null);
|
||||
|
||||
else if ("data".equals(scheme))
|
||||
new SimpleTask<File>() {
|
||||
|
@ -3923,7 +3924,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}.execute(context, owner, args, "view:cid");
|
||||
|
||||
else
|
||||
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, source), Toast.LENGTH_LONG).show();
|
||||
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
private void onMenuUnseen(final TupleMessageEx message) {
|
||||
|
|
Loading…
Reference in a new issue