mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Check if edited url has correct scheme
This commit is contained in:
parent
f525b88b84
commit
02de397be8
1 changed files with 5 additions and 0 deletions
|
@ -318,6 +318,11 @@ public class FragmentMessage extends FragmentEx {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
Uri uri = Uri.parse(etLink.getText().toString());
|
Uri uri = Uri.parse(etLink.getText().toString());
|
||||||
|
|
||||||
|
if (!"http".equals(uri.getScheme()) && !"https".equals(uri.getScheme())) {
|
||||||
|
Toast.makeText(getContext(), getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// https://developer.chrome.com/multidevice/android/customtabs
|
// https://developer.chrome.com/multidevice/android/customtabs
|
||||||
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
||||||
builder.setToolbarColor(Helper.resolveColor(getContext(), R.attr.colorPrimary));
|
builder.setToolbarColor(Helper.resolveColor(getContext(), R.attr.colorPrimary));
|
||||||
|
|
Loading…
Reference in a new issue