Trim giphy queries.
This commit is contained in:
parent
1f3e131690
commit
a2e31e97db
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.giph.model.GiphyImage;
|
|||
import org.thoughtcrime.securesms.giph.model.GiphyResponse;
|
||||
import org.thoughtcrime.securesms.net.ContentProxySelector;
|
||||
import org.thoughtcrime.securesms.util.JsonUtils;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
|
@ -48,7 +49,7 @@ final class GiphyMp4PagedDataSource implements PagedDataSource<GiphyImage> {
|
|||
private final OkHttpClient client;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue