mirror of https://github.com/M66B/FairEmail.git
Open with as new task
This commit is contained in:
parent
87b09c60b2
commit
bac693e3e0
|
@ -5738,7 +5738,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Uri uri = Uri.parse(etLink.getText().toString());
|
||||
Helper.view(context, uri, true);
|
||||
Helper.view(context, uri, true, true);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
|
@ -483,11 +483,17 @@ public class Helper {
|
|||
}
|
||||
|
||||
static void view(Context context, Uri uri, boolean browse) {
|
||||
view(context, uri, browse, false);
|
||||
}
|
||||
|
||||
static void view(Context context, Uri uri, boolean browse, boolean task) {
|
||||
Log.i("View=" + uri);
|
||||
|
||||
if (browse || !hasCustomTabs(context, uri)) {
|
||||
try {
|
||||
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
||||
if (task)
|
||||
view.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(getChooser(context, view));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
|
Loading…
Reference in New Issue