From 552aeb8ed0bcd05c535ed99df6a23ceba050f03a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 17 Apr 2014 22:13:00 -0700 Subject: #142 Add pull to refresh to all views --- src/github/daneren2005/dsub/fragments/ChatFragment.java | 5 +++++ src/github/daneren2005/dsub/fragments/SearchFragment.java | 4 ++++ src/github/daneren2005/dsub/fragments/SelectArtistFragment.java | 5 +++++ .../daneren2005/dsub/fragments/SelectDirectoryFragment.java | 6 ++++++ src/github/daneren2005/dsub/fragments/SelectListFragment.java | 5 +++++ src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 9 ++++++++- 6 files changed, 33 insertions(+), 1 deletion(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/fragments/ChatFragment.java b/src/github/daneren2005/dsub/fragments/ChatFragment.java index 0721f995..a44221ee 100644 --- a/src/github/daneren2005/dsub/fragments/ChatFragment.java +++ b/src/github/daneren2005/dsub/fragments/ChatFragment.java @@ -9,6 +9,7 @@ import java.util.Collections; import java.util.List; import android.os.Bundle; import android.os.Handler; +import android.support.v4.widget.SwipeRefreshLayout; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; @@ -127,6 +128,9 @@ public class ChatFragment extends SubsonicFragment { } setTitle(R.string.button_bar_chat); + refreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_layout); + refreshLayout.setOnRefreshListener(this); + return rootView; } @@ -213,6 +217,7 @@ public class ChatFragment extends SubsonicFragment { ChatAdapter chatAdapter = new ChatAdapter(context, messageList); chatListView.setAdapter(chatAdapter); } + refreshLayout.setRefreshing(false); } }; diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java index bd92c1bf..888a5496 100644 --- a/src/github/daneren2005/dsub/fragments/SearchFragment.java +++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java @@ -6,6 +6,7 @@ import java.util.Arrays; import android.content.Intent; import android.os.Bundle; +import android.support.v4.widget.SwipeRefreshLayout; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.Menu; @@ -128,6 +129,9 @@ public class SearchFragment extends SubsonicFragment { populateList(); } + refreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_layout); + refreshLayout.setEnabled(false); + return rootView; } diff --git a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java index d10a9c1b..29c6c981 100644 --- a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java @@ -2,6 +2,7 @@ package github.daneren2005.dsub.fragments; import android.os.Build; import android.os.Bundle; +import android.support.v4.widget.SwipeRefreshLayout; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.Menu; @@ -89,6 +90,9 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie setMusicFolders(); } + refreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_layout); + refreshLayout.setOnRefreshListener(this); + return rootView; } @@ -215,6 +219,7 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie setMusicFolders(); artistList.setVisibility(View.VISIBLE); + refreshLayout.setRefreshing(false); } }; task.execute(); diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 5e3281a4..ba2aad1a 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; +import android.support.v4.widget.SwipeRefreshLayout; import android.util.Log; import android.view.ContextMenu; import android.view.LayoutInflater; @@ -158,6 +159,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter setTitle(name); } + refreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_layout); + refreshLayout.setOnRefreshListener(this); + return rootView; } @@ -602,6 +606,8 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if (playAll && !restoredInstance) { playAll(args.getBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, false), false); } + + refreshLayout.setRefreshing(false); } private void playNow(final boolean shuffle, final boolean append) { diff --git a/src/github/daneren2005/dsub/fragments/SelectListFragment.java b/src/github/daneren2005/dsub/fragments/SelectListFragment.java index 5e96ced5..a568d65b 100644 --- a/src/github/daneren2005/dsub/fragments/SelectListFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectListFragment.java @@ -19,6 +19,7 @@ package github.daneren2005.dsub.fragments; import android.os.Bundle; +import android.support.v4.widget.SwipeRefreshLayout; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -86,6 +87,9 @@ public abstract class SelectListFragment extends SubsonicFragment implements listView.setAdapter(adapter = getAdapter(objects)); } + refreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_layout); + refreshLayout.setOnRefreshListener(this); + return rootView; } @@ -134,6 +138,7 @@ public abstract class SelectListFragment extends SubsonicFragment implements listView.setAdapter(adapter = getAdapter(result)); listView.setVisibility(View.VISIBLE); } + refreshLayout.setRefreshing(false); } }; task.execute(); diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index bd0a3f45..a8539723 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -30,6 +30,7 @@ import android.media.MediaMetadataRetriever; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; +import android.support.v4.widget.SwipeRefreshLayout; import android.util.Log; import android.view.ContextMenu; import android.view.GestureDetector; @@ -75,7 +76,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Random; -public class SubsonicFragment extends Fragment { +public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnRefreshListener { private static final String TAG = SubsonicFragment.class.getSimpleName(); private static int TAG_INC = 10; private int tag; @@ -92,6 +93,7 @@ public class SubsonicFragment extends Fragment { protected Share share; protected boolean artist = false; protected boolean artistOverride = false; + protected SwipeRefreshLayout refreshLayout; public SubsonicFragment() { super(); @@ -406,6 +408,11 @@ public class SubsonicFragment extends Fragment { } + @Override + public void onRefresh() { + refresh(); + } + protected void exit() { if(context.getClass() != SubsonicFragmentActivity.class) { Intent intent = new Intent(context, SubsonicFragmentActivity.class); -- cgit v1.2.3 From d761e0651f78ee62c6805803dcf1fe9e335a974e Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 18 Apr 2014 22:38:49 -0700 Subject: Remove refresh button from everywhere --- res/menu/abstract_top_menu.xml | 6 ------ res/menu/empty.xml | 6 +----- res/menu/select_album.xml | 6 ------ res/menu/select_album_list.xml | 9 --------- res/menu/select_artist.xml | 6 ------ res/menu/select_podcast_episode.xml | 6 ------ res/menu/select_podcast_episode_offline.xml | 6 ------ res/menu/select_podcasts.xml | 6 ------ res/menu/select_song.xml | 6 ------ res/menu/select_song_offline.xml | 6 ------ .../daneren2005/dsub/fragments/SelectDirectoryFragment.java | 2 +- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 3 --- 12 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 res/menu/select_album_list.xml (limited to 'src/github') diff --git a/res/menu/abstract_top_menu.xml b/res/menu/abstract_top_menu.xml index 46419d0f..67d18390 100644 --- a/res/menu/abstract_top_menu.xml +++ b/res/menu/abstract_top_menu.xml @@ -1,12 +1,6 @@ - - - + diff --git a/res/menu/select_album.xml b/res/menu/select_album.xml index 8dc004f1..4b79d251 100644 --- a/res/menu/select_album.xml +++ b/res/menu/select_album.xml @@ -7,12 +7,6 @@ android:title="@string/menu.play" compat:showAsAction="always|withText"/> - - - - - diff --git a/res/menu/select_artist.xml b/res/menu/select_artist.xml index d1e1f4e3..127736d6 100644 --- a/res/menu/select_artist.xml +++ b/res/menu/select_artist.xml @@ -1,12 +1,6 @@ - - - - diff --git a/res/menu/select_podcast_episode_offline.xml b/res/menu/select_podcast_episode_offline.xml index 7080768a..3665d317 100644 --- a/res/menu/select_podcast_episode_offline.xml +++ b/res/menu/select_podcast_episode_offline.xml @@ -1,12 +1,6 @@ - - diff --git a/res/menu/select_podcasts.xml b/res/menu/select_podcasts.xml index 212feb04..2f0ab38a 100644 --- a/res/menu/select_podcasts.xml +++ b/res/menu/select_podcasts.xml @@ -1,12 +1,6 @@ - - - - - - Date: Sat, 19 Apr 2014 13:18:56 -0700 Subject: Remove pointless intermediate messages --- res/values-de/strings.xml | 2 -- res/values-es/strings.xml | 2 -- res/values-hu/strings.xml | 2 -- res/values-ru/strings.xml | 2 -- res/values/strings.xml | 4 +--- src/github/daneren2005/dsub/service/parser/AlbumListParser.java | 3 --- src/github/daneren2005/dsub/service/parser/BookmarkParser.java | 2 -- src/github/daneren2005/dsub/service/parser/ChatMessageParser.java | 2 -- src/github/daneren2005/dsub/service/parser/GenreParser.java | 3 --- src/github/daneren2005/dsub/service/parser/IndexesParser.java | 2 -- src/github/daneren2005/dsub/service/parser/LyricsParser.java | 1 - src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java | 2 -- src/github/daneren2005/dsub/service/parser/MusicFoldersParser.java | 3 --- src/github/daneren2005/dsub/service/parser/PlaylistParser.java | 2 -- src/github/daneren2005/dsub/service/parser/PlaylistsParser.java | 3 --- src/github/daneren2005/dsub/service/parser/PodcastChannelParser.java | 1 - src/github/daneren2005/dsub/service/parser/PodcastEntryParser.java | 1 - src/github/daneren2005/dsub/service/parser/RandomSongsParser.java | 2 -- src/github/daneren2005/dsub/service/parser/SearchResult2Parser.java | 2 -- src/github/daneren2005/dsub/service/parser/SearchResultParser.java | 2 -- src/github/daneren2005/dsub/service/parser/ShareParser.java | 3 --- src/github/daneren2005/dsub/service/parser/StarredListParser.java | 3 --- 22 files changed, 1 insertion(+), 48 deletions(-) (limited to 'src/github') diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 1963790c..ce9a68e5 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -420,8 +420,6 @@ Kontaktiere Server, bitte warten. - Lese vom Server. - Lese vom Server. Fertig! Inkompatible Versionen. Aktualisierung der DSub Android App erforderlich. Inkompatible Versionen. Aktualisierung des Subsonic Server erforderlich. Benutzername oder/und Passwort falsch. diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index db557f19..e18e4b08 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -434,8 +434,6 @@ Conectando con el servidor, espere por favor. - Leyendo desde el servidor. - Leyendo desde el servidor. Hecho! Versiones incompatibles. Por favor, actualice la aplicación DSub de Android. Versiones incompatibles. Por favor, actualice su servidor Subsonic. Usuario o contraseña inconrrectos. diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 1625ab84..9a4e51ae 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -441,8 +441,6 @@ Csatlakozás a kiszolgálóhoz, kérem várjon! - Olvasás a kiszolgálóról... - Olvasás a kiszolgálóról. Kész! Nem kompatibilis verzió. Kérjük, frissítse a DSub Android alkalmazást! Nem kompatibilis verzió. Kérjük, frissítse a Subsonic kiszolgálót! Hibás felhasználónév vagy jelszó! diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index d4edbf46..7094fe7d 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -259,8 +259,6 @@ Подключение к серверу. Пожалуйста, подождите. - Чтение с сервера. - Чтение с сервера выполнено! Несовместимые версии. Пожалуйста, обновите приложение DSub для Android. Несовместимые версии. Пожалуйста, обновите сервер Subsonic. Неправильное имя пользователя или пароль. diff --git a/res/values/strings.xml b/res/values/strings.xml index d0df0d24..0cbb9330 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -440,9 +440,7 @@ Contacting server, please wait. - Reading from server. - Reading from server. Done! - Incompatible versions. Please upgrade DSub Android app. + Incompatible versions. Please upgrade DSub. Incompatible versions. Please upgrade Subsonic server. Wrong username or password. Not authorized. Check user permissions in Subsonic server. diff --git a/src/github/daneren2005/dsub/service/parser/AlbumListParser.java b/src/github/daneren2005/dsub/service/parser/AlbumListParser.java index 9cf064e6..880a9a22 100644 --- a/src/github/daneren2005/dsub/service/parser/AlbumListParser.java +++ b/src/github/daneren2005/dsub/service/parser/AlbumListParser.java @@ -36,8 +36,6 @@ public class AlbumListParser extends MusicDirectoryEntryParser { } public MusicDirectory parse(Reader reader, ProgressListener progressListener) throws Exception { - - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory dir = new MusicDirectory(); @@ -57,7 +55,6 @@ public class AlbumListParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return dir; } diff --git a/src/github/daneren2005/dsub/service/parser/BookmarkParser.java b/src/github/daneren2005/dsub/service/parser/BookmarkParser.java index a71e0e8b..23db3a07 100644 --- a/src/github/daneren2005/dsub/service/parser/BookmarkParser.java +++ b/src/github/daneren2005/dsub/service/parser/BookmarkParser.java @@ -37,7 +37,6 @@ public class BookmarkParser extends MusicDirectoryEntryParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); List bookmarks = new ArrayList(); @@ -69,7 +68,6 @@ public class BookmarkParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return bookmarks; } diff --git a/src/github/daneren2005/dsub/service/parser/ChatMessageParser.java b/src/github/daneren2005/dsub/service/parser/ChatMessageParser.java index 1425a734..8e37de40 100644 --- a/src/github/daneren2005/dsub/service/parser/ChatMessageParser.java +++ b/src/github/daneren2005/dsub/service/parser/ChatMessageParser.java @@ -38,7 +38,6 @@ public class ChatMessageParser extends AbstractParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); List result = new ArrayList(); int eventType; @@ -60,7 +59,6 @@ public class ChatMessageParser extends AbstractParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return result; } diff --git a/src/github/daneren2005/dsub/service/parser/GenreParser.java b/src/github/daneren2005/dsub/service/parser/GenreParser.java index 35913ba9..e963442c 100644 --- a/src/github/daneren2005/dsub/service/parser/GenreParser.java +++ b/src/github/daneren2005/dsub/service/parser/GenreParser.java @@ -45,8 +45,6 @@ public class GenreParser extends AbstractParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); - List result = new ArrayList(); StringReader sr = null; @@ -118,7 +116,6 @@ public class GenreParser extends AbstractParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return Genre.GenreComparator.sort(result); } diff --git a/src/github/daneren2005/dsub/service/parser/IndexesParser.java b/src/github/daneren2005/dsub/service/parser/IndexesParser.java index 30ea190b..3af76e1d 100644 --- a/src/github/daneren2005/dsub/service/parser/IndexesParser.java +++ b/src/github/daneren2005/dsub/service/parser/IndexesParser.java @@ -49,9 +49,7 @@ public class IndexesParser extends MusicDirectoryEntryParser { } public Indexes parse(Reader reader, ProgressListener progressListener) throws Exception { - long t0 = System.currentTimeMillis(); - updateProgress(progressListener, R.string.parser_reading); init(reader); List artists = new ArrayList(); diff --git a/src/github/daneren2005/dsub/service/parser/LyricsParser.java b/src/github/daneren2005/dsub/service/parser/LyricsParser.java index 98b0f6a0..b621d518 100644 --- a/src/github/daneren2005/dsub/service/parser/LyricsParser.java +++ b/src/github/daneren2005/dsub/service/parser/LyricsParser.java @@ -36,7 +36,6 @@ public class LyricsParser extends AbstractParser { } public Lyrics parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); Lyrics lyrics = null; diff --git a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java index 75f878be..e09aa33b 100644 --- a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java +++ b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java @@ -44,7 +44,6 @@ public class MusicDirectoryParser extends MusicDirectoryEntryParser { public MusicDirectory parse(String artist, Reader reader, ProgressListener progressListener) throws Exception { long t0 = System.currentTimeMillis(); - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory dir = new MusicDirectory(); @@ -74,7 +73,6 @@ public class MusicDirectoryParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); // Only apply sorting on server version 4.7 and greater, where disc is supported if(Util.checkServerVersion(context, "1.8.0") && Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_CUSTOM_SORT_ENABLED, true)) { diff --git a/src/github/daneren2005/dsub/service/parser/MusicFoldersParser.java b/src/github/daneren2005/dsub/service/parser/MusicFoldersParser.java index d6b0fa90..246c3415 100644 --- a/src/github/daneren2005/dsub/service/parser/MusicFoldersParser.java +++ b/src/github/daneren2005/dsub/service/parser/MusicFoldersParser.java @@ -39,8 +39,6 @@ public class MusicFoldersParser extends AbstractParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - - updateProgress(progressListener, R.string.parser_reading); init(reader); List result = new ArrayList(); @@ -60,7 +58,6 @@ public class MusicFoldersParser extends AbstractParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return result; } diff --git a/src/github/daneren2005/dsub/service/parser/PlaylistParser.java b/src/github/daneren2005/dsub/service/parser/PlaylistParser.java index c630eb44..1eda1806 100644 --- a/src/github/daneren2005/dsub/service/parser/PlaylistParser.java +++ b/src/github/daneren2005/dsub/service/parser/PlaylistParser.java @@ -36,7 +36,6 @@ public class PlaylistParser extends MusicDirectoryEntryParser { } public MusicDirectory parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory dir = new MusicDirectory(); @@ -57,7 +56,6 @@ public class PlaylistParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return dir; } diff --git a/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java b/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java index a5bf2497..c3b47f47 100644 --- a/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java +++ b/src/github/daneren2005/dsub/service/parser/PlaylistsParser.java @@ -39,8 +39,6 @@ public class PlaylistsParser extends AbstractParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - - updateProgress(progressListener, R.string.parser_reading); init(reader); List result = new ArrayList(); @@ -65,7 +63,6 @@ public class PlaylistsParser extends AbstractParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return PlaylistAdapter.PlaylistComparator.sort(result); } diff --git a/src/github/daneren2005/dsub/service/parser/PodcastChannelParser.java b/src/github/daneren2005/dsub/service/parser/PodcastChannelParser.java index bfdef7f2..6c83fad6 100644 --- a/src/github/daneren2005/dsub/service/parser/PodcastChannelParser.java +++ b/src/github/daneren2005/dsub/service/parser/PodcastChannelParser.java @@ -37,7 +37,6 @@ public class PodcastChannelParser extends AbstractParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); List channels = new ArrayList(); diff --git a/src/github/daneren2005/dsub/service/parser/PodcastEntryParser.java b/src/github/daneren2005/dsub/service/parser/PodcastEntryParser.java index 58b1432b..c331f7e1 100644 --- a/src/github/daneren2005/dsub/service/parser/PodcastEntryParser.java +++ b/src/github/daneren2005/dsub/service/parser/PodcastEntryParser.java @@ -39,7 +39,6 @@ public class PodcastEntryParser extends AbstractParser { } public MusicDirectory parse(String channel, Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory episodes = new MusicDirectory(); diff --git a/src/github/daneren2005/dsub/service/parser/RandomSongsParser.java b/src/github/daneren2005/dsub/service/parser/RandomSongsParser.java index 3e62d3dc..88be3662 100644 --- a/src/github/daneren2005/dsub/service/parser/RandomSongsParser.java +++ b/src/github/daneren2005/dsub/service/parser/RandomSongsParser.java @@ -36,7 +36,6 @@ public class RandomSongsParser extends MusicDirectoryEntryParser { } public MusicDirectory parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory dir = new MusicDirectory(); @@ -54,7 +53,6 @@ public class RandomSongsParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return dir; } diff --git a/src/github/daneren2005/dsub/service/parser/SearchResult2Parser.java b/src/github/daneren2005/dsub/service/parser/SearchResult2Parser.java index abf96d7f..ce4a71c8 100644 --- a/src/github/daneren2005/dsub/service/parser/SearchResult2Parser.java +++ b/src/github/daneren2005/dsub/service/parser/SearchResult2Parser.java @@ -40,7 +40,6 @@ public class SearchResult2Parser extends MusicDirectoryEntryParser { } public SearchResult parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); List artists = new ArrayList(); @@ -69,7 +68,6 @@ public class SearchResult2Parser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return new SearchResult(artists, albums, songs); } diff --git a/src/github/daneren2005/dsub/service/parser/SearchResultParser.java b/src/github/daneren2005/dsub/service/parser/SearchResultParser.java index c8ef4031..952b95bc 100644 --- a/src/github/daneren2005/dsub/service/parser/SearchResultParser.java +++ b/src/github/daneren2005/dsub/service/parser/SearchResultParser.java @@ -41,7 +41,6 @@ public class SearchResultParser extends MusicDirectoryEntryParser { } public SearchResult parse(Reader reader, ProgressListener progressListener) throws Exception { - updateProgress(progressListener, R.string.parser_reading); init(reader); List songs = new ArrayList(); @@ -59,7 +58,6 @@ public class SearchResultParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return new SearchResult(Collections.emptyList(), Collections.emptyList(), songs); } diff --git a/src/github/daneren2005/dsub/service/parser/ShareParser.java b/src/github/daneren2005/dsub/service/parser/ShareParser.java index 35d6584f..25feb5af 100644 --- a/src/github/daneren2005/dsub/service/parser/ShareParser.java +++ b/src/github/daneren2005/dsub/service/parser/ShareParser.java @@ -43,8 +43,6 @@ public class ShareParser extends MusicDirectoryEntryParser { } public List parse(Reader reader, ProgressListener progressListener) throws Exception { - - updateProgress(progressListener, R.string.parser_reading); init(reader); List dir = new ArrayList(); @@ -87,7 +85,6 @@ public class ShareParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return dir; } diff --git a/src/github/daneren2005/dsub/service/parser/StarredListParser.java b/src/github/daneren2005/dsub/service/parser/StarredListParser.java index bd2a7888..89addecd 100644 --- a/src/github/daneren2005/dsub/service/parser/StarredListParser.java +++ b/src/github/daneren2005/dsub/service/parser/StarredListParser.java @@ -36,8 +36,6 @@ public class StarredListParser extends MusicDirectoryEntryParser { } public MusicDirectory parse(Reader reader, ProgressListener progressListener) throws Exception { - - updateProgress(progressListener, R.string.parser_reading); init(reader); MusicDirectory dir = new MusicDirectory(); @@ -63,7 +61,6 @@ public class StarredListParser extends MusicDirectoryEntryParser { } while (eventType != XmlPullParser.END_DOCUMENT); validate(); - updateProgress(progressListener, R.string.parser_reading_done); return dir; } -- cgit v1.2.3