Merge pull request #1748 from mfietz/issue/1747-itunes-search-ise

iTunes search: Prevent IllegalStateException
This commit is contained in:
Tom Hennen 2016-03-07 20:47:31 -05:00
commit 77b3dfca78
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ public class ItunesSearchFragment extends Fragment {
} else {
gridView.setVisibility(View.GONE);
progressBar.setVisibility(View.VISIBLE);
rx.Observable.create((Observable.OnSubscribe<String>) subscriber -> {
subscription = Observable.create((Observable.OnSubscribe<String>) subscriber -> {
OkHttpClient client = AntennapodHttpClient.getHttpClient();
Request.Builder httpReq = new Request.Builder()
.url(podcast.feedUrl)
@ -233,7 +233,7 @@ public class ItunesSearchFragment extends Fragment {
butRetry.setVisibility(View.GONE);
txtvEmpty.setVisibility(View.GONE);
progressBar.setVisibility(View.VISIBLE);
subscription = rx.Observable.create((Observable.OnSubscribe<List<Podcast>>) subscriber -> {
subscription = Observable.create((Observable.OnSubscribe<List<Podcast>>) subscriber -> {
String lang = Locale.getDefault().getLanguage();
String url = "https://itunes.apple.com/" + lang + "/rss/toppodcasts/limit=25/explicit=true/json";
OkHttpClient client = AntennapodHttpClient.getHttpClient();