From 6078909b80422dbfdb97947e48b6cca454196354 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 2 Jul 2013 23:08:49 -0700 Subject: Convert all fragments over to displaying nothing while refreshing/in error --- .../src/github/daneren2005/dsub/fragments/SelectGenreFragment.java | 3 ++- .../src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java | 2 ++ .../src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java | 3 ++- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java index 7ac7ace8..623aba4e 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java @@ -94,6 +94,7 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView private void load(final boolean refresh) { setTitle(R.string.main_albums_genres); + genreListView.setVisibility(View.INVISIBLE); BackgroundTask> task = new TabBackgroundTask>(this) { @Override @@ -117,8 +118,8 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView if (result != null) { genreListView.setAdapter(new GenreAdapter(context, result)); + genreListView.setVisibility(View.VISIBLE); } - } }; task.execute(); diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java index 00830b72..0d7fce76 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java @@ -162,6 +162,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV private void load(final boolean refresh) { setTitle(R.string.playlist_label); + list.setVisibility(View.INVISIBLE); BackgroundTask> task = new TabBackgroundTask>(this) { @Override @@ -178,6 +179,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV protected void done(List result) { list.setAdapter(playlistAdapter = new PlaylistAdapter(context, result)); emptyTextView.setVisibility(result.isEmpty() ? View.VISIBLE : View.GONE); + list.setVisibility(View.VISIBLE); } }; task.execute(); diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java index dc563135..ac12e17d 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java @@ -95,6 +95,7 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV @Override protected void refresh(final boolean refresh) { setTitle(R.string.button_bar_podcasts); + podcastListView.setVisibility(View.INVISIBLE); BackgroundTask> task = new TabBackgroundTask>(this) { @Override @@ -118,8 +119,8 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV if (result != null) { podcastListView.setAdapter(new PodcastChannelAdapter(context, result)); + podcastListView.setVisibility(View.VISIBLE); } - } }; task.execute(); diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 900d0661..a002dcb6 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -888,6 +888,8 @@ public class RESTMusicService implements MusicService { @Override public List getPodcastChannels(boolean refresh, Context context, ProgressListener progressListener) throws Exception { + checkServerVersion(context, "1.9", "Podcasts not supported."); + Reader reader = getReader(context, progressListener, "getPodcasts", null, Arrays.asList("includeEpisodes"), Arrays.asList("false")); try { return new PodcastChannelParser(context).parse(reader, progressListener); -- cgit v1.2.3