fix nsfw search flag
This commit is contained in:
parent
cc1ddfa16e
commit
b36813ebe6
1 changed files with 3 additions and 1 deletions
|
@ -40,9 +40,11 @@ public class Lighthouse {
|
||||||
Uri.Builder uriBuilder = Uri.parse(String.format("%s/search", CONNECTION_STRING)).buildUpon().
|
Uri.Builder uriBuilder = Uri.parse(String.format("%s/search", CONNECTION_STRING)).buildUpon().
|
||||||
appendQueryParameter("s", rawQuery).
|
appendQueryParameter("s", rawQuery).
|
||||||
appendQueryParameter("resolve", "true").
|
appendQueryParameter("resolve", "true").
|
||||||
appendQueryParameter("nsfw", String.valueOf(nsfw).toLowerCase()).
|
|
||||||
appendQueryParameter("size", String.valueOf(size)).
|
appendQueryParameter("size", String.valueOf(size)).
|
||||||
appendQueryParameter("from", String.valueOf(from));
|
appendQueryParameter("from", String.valueOf(from));
|
||||||
|
if (!nsfw) {
|
||||||
|
uriBuilder.appendQueryParameter("nsfw", String.valueOf(nsfw).toLowerCase());
|
||||||
|
}
|
||||||
if (!Helper.isNullOrEmpty(relatedTo)) {
|
if (!Helper.isNullOrEmpty(relatedTo)) {
|
||||||
uriBuilder.appendQueryParameter("related_to", relatedTo);
|
uriBuilder.appendQueryParameter("related_to", relatedTo);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue