kopia lustrzana https://github.com/ryukoposting/Signal-Android
Trim giphy queries.
rodzic
1f3e131690
commit
a2e31e97db
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue