Confirm inserting links from clipboard

pull/147/head
M66B 7 years ago
parent 923cf2e6d5
commit 2753248c2f

@ -610,12 +610,11 @@ public class FragmentCompose extends FragmentEx {
uri = null;
}
if (uri == null) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_link, null);
final int fStart = start;
final int fEnd = end;
final EditText etLink = view.findViewById(R.id.etLink);
etLink.setText("https://");
etLink.setText(uri == null ? "https://" : uri.toString());
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
.setView(view)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@ -633,10 +632,8 @@ public class FragmentCompose extends FragmentEx {
etLink.requestFocus();
}
});
return;
} else
s.setSpan(new URLSpan(uri.toString()), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
break;
}
etBody.setText(s);

Loading…
Cancel
Save