mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 03:58:48 +00:00
Trim giphy queries.
This commit is contained in:
@@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.giph.model.GiphyImage;
|
|||||||
import org.thoughtcrime.securesms.giph.model.GiphyResponse;
|
import org.thoughtcrime.securesms.giph.model.GiphyResponse;
|
||||||
import org.thoughtcrime.securesms.net.ContentProxySelector;
|
import org.thoughtcrime.securesms.net.ContentProxySelector;
|
||||||
import org.thoughtcrime.securesms.util.JsonUtils;
|
import org.thoughtcrime.securesms.util.JsonUtils;
|
||||||
|
import org.whispersystems.libsignal.util.guava.Optional;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@@ -48,7 +49,7 @@ final class GiphyMp4PagedDataSource implements PagedDataSource<GiphyImage> {
|
|||||||
private final OkHttpClient client;
|
private final OkHttpClient client;
|
||||||
|
|
||||||
GiphyMp4PagedDataSource(@Nullable String searchQuery) {
|
GiphyMp4PagedDataSource(@Nullable String searchQuery) {
|
||||||
this.searchString = searchQuery;
|
this.searchString = Optional.fromNullable(searchQuery).transform(String::trim).or("");
|
||||||
this.client = ApplicationDependencies.getOkHttpClient().newBuilder().proxySelector(new ContentProxySelector()).build();
|
this.client = ApplicationDependencies.getOkHttpClient().newBuilder().proxySelector(new ContentProxySelector()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user