Recognize links without protocol

This commit is contained in:
M66B
2019-04-11 11:52:43 +02:00
parent 2a588443f2
commit 683087bfe4
3 changed files with 7 additions and 2 deletions

View File

@@ -1768,7 +1768,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
@Override
protected String onExecute(Context context, Bundle args) throws Throwable {
Uri uri = args.getParcelable("uri");
String host = uri.getHost();
String host;
if (TextUtils.isEmpty(uri.getScheme()))
host = Uri.parse("https://" + uri.toString()).getHost();
else
host = uri.getHost();
return (TextUtils.isEmpty(host) ? null : Helper.getOrganization(host));
}