mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 05:34:51 +00:00
Rebuild link only when query parameters haven been removed
This commit is contained in:
parent
22cb48be11
commit
d768ea3db9
1 changed files with 9 additions and 7 deletions
|
@ -3426,16 +3426,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
// https://en.wikipedia.org/wiki/UTM_parameters
|
||||
Uri.Builder builder = uri.buildUpon();
|
||||
|
||||
boolean changed = false;
|
||||
builder.clearQuery();
|
||||
for (String key : uri.getQueryParameterNames())
|
||||
if (!PARANOID_QUERY.contains(key.toLowerCase()))
|
||||
for (String value : uri.getQueryParameters(key))
|
||||
if (!TextUtils.isEmpty(key)) {
|
||||
Log.i("Query " + key + "=" + value);
|
||||
builder.appendQueryParameter(key, value);
|
||||
}
|
||||
if (PARANOID_QUERY.contains(key.toLowerCase()))
|
||||
changed = true;
|
||||
else if (!TextUtils.isEmpty(key))
|
||||
for (String value : uri.getQueryParameters(key)) {
|
||||
Log.i("Query " + key + "=" + value);
|
||||
builder.appendQueryParameter(key, value);
|
||||
}
|
||||
|
||||
sanitized = builder.build();
|
||||
sanitized = (changed ? builder.build() : uri);
|
||||
}
|
||||
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_open_link, null);
|
||||
|
|
Loading…
Reference in a new issue