Guess sheme for confirmed host names

This commit is contained in:
M66B 2021-09-09 10:48:56 +02:00
parent 3c3625b633
commit 3ab7e23547
1 changed files with 5 additions and 2 deletions

View File

@ -4769,9 +4769,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
return false;
boolean confirm_links = prefs.getBoolean("confirm_links", true);
Uri guri = UriHelper.guessScheme(uri);
String scheme = guri.getScheme();
String host = guri.getHost();;
boolean confirm_link =
!"https".equals(uri.getScheme()) || TextUtils.isEmpty(uri.getHost()) ||
prefs.getBoolean(uri.getHost() + ".confirm_link", true);
!"https".equals(scheme) || TextUtils.isEmpty(host) ||
prefs.getBoolean(host + ".confirm_link", true);
if (always_confirm || (confirm_links && confirm_link)) {
Bundle args = new Bundle();
args.putParcelable("uri", uri);