From c2606da30d155dc6da275dcb236b10d181c78d65 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 14 Nov 2013 10:15:32 -0800 Subject: Don't bother with cache indicator for playlist, just confusing right now --- src/github/daneren2005/dsub/view/PlaylistView.java | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/view/PlaylistView.java b/src/github/daneren2005/dsub/view/PlaylistView.java index b5034493..c75f8ad7 100644 --- a/src/github/daneren2005/dsub/view/PlaylistView.java +++ b/src/github/daneren2005/dsub/view/PlaylistView.java @@ -40,7 +40,6 @@ public class PlaylistView extends UpdateView { private Context context; private Playlist playlist; - private File file; private TextView titleView; @@ -63,11 +62,5 @@ public class PlaylistView extends UpdateView { protected void setObjectImpl(Object obj) { this.playlist = (Playlist) obj; titleView.setText(playlist.getName()); - file = FileUtil.getPlaylistFile(Util.getServerName(context), playlist.getName()); - } - - @Override - protected void updateBackground() { - exists = file.exists(); } } -- cgit v1.2.3 From 6a6f300c700967d4347fe7c12f5134886902be28 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 14 Nov 2013 10:24:41 -0800 Subject: Make sure that onDownloadList/Current/Progress changed don't run at same time --- .../daneren2005/dsub/fragments/DownloadFragment.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index 91fda9b1..a35e7c42 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -986,6 +986,11 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex, size)); onDownloadListChangedTask = null; + if(onCurrentChangedTask != null) { + onCurrentChangedTask.execute(); + } else if(onProgressChangedTask != null) { + onProgressChangedTask.execute(); + } } }; onDownloadListChangedTask.execute(); @@ -1024,9 +1029,15 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe setSubtitle(null); } onCurrentChangedTask = null; + if(onProgressChangedTask != null) { + onProgressChangedTask.execute(); + } } }; - onCurrentChangedTask.execute(); + + if(onDownloadListChangedTask == null) { + onCurrentChangedTask.execute(); + } } private void onProgressChanged() { @@ -1119,7 +1130,9 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe onProgressChangedTask = null; } }; - onProgressChangedTask.execute(); + if(onDownloadListChangedTask == null && onCurrentChangedTask == null) { + onProgressChangedTask.execute(); + } } private void changeProgress(final int ms) { -- cgit v1.2.3 From cf6c4ce9d153291b1cebaa832a0a55942f89cad7 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 14 Nov 2013 14:19:12 -0800 Subject: Add a way to not linkify a dialog's text --- src/github/daneren2005/dsub/util/Util.java | 32 ++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java index 7ff551de..c4f51e5c 100644 --- a/src/github/daneren2005/dsub/util/Util.java +++ b/src/github/daneren2005/dsub/util/Util.java @@ -786,24 +786,44 @@ public final class Util { } public static void info(Context context, int titleId, int messageId) { - showDialog(context, android.R.drawable.ic_dialog_info, titleId, messageId); + info(context, titleId, messageId, true); } public static void info(Context context, int titleId, String message) { - showDialog(context, android.R.drawable.ic_dialog_info, titleId, message); + info(context, titleId, message, true); } public static void info(Context context, String title, String message) { - showDialog(context, android.R.drawable.ic_dialog_info, title, message); + info(context, title, message); + } + public static void info(Context context, int titleId, int messageId, boolean linkify) { + showDialog(context, android.R.drawable.ic_dialog_info, titleId, messageId, linkify); + } + public static void info(Context context, int titleId, String message, boolean linkify) { + showDialog(context, android.R.drawable.ic_dialog_info, titleId, message, linkify); + } + public static void info(Context context, String title, String message, boolean linkify) { + showDialog(context, android.R.drawable.ic_dialog_info, title, message, linkify); } private static void showDialog(Context context, int icon, int titleId, int messageId) { - showDialog(context, icon, context.getResources().getString(titleId), context.getResources().getString(messageId)); + showDialog(context, icon, titleId, messageId, true); } private static void showDialog(Context context, int icon, int titleId, String message) { - showDialog(context, icon, context.getResources().getString(titleId), message); + showDialog(context, icon, titleId, message, true); } private static void showDialog(Context context, int icon, String title, String message) { + showDialog(context, icon, title, message, true); + } + private static void showDialog(Context context, int icon, int titleId, int messageId, boolean linkify) { + showDialog(context, icon, context.getResources().getString(titleId), context.getResources().getString(messageId), linkify); + } + private static void showDialog(Context context, int icon, int titleId, String message, boolean linkify) { + showDialog(context, icon, context.getResources().getString(titleId), message, linkify); + } + private static void showDialog(Context context, int icon, String title, String message, boolean linkify) { SpannableString ss = new SpannableString(message); - Linkify.addLinks(ss, Linkify.ALL); + if(linkify) { + Linkify.addLinks(ss, Linkify.ALL); + } AlertDialog dialog = new AlertDialog.Builder(context) .setIcon(icon) -- cgit v1.2.3 From cbf69f5d274fd11381da725fbe8e6fee709c4b04 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 14 Nov 2013 14:20:01 -0800 Subject: Don't linkify bookmark details --- src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java index 47069266..fce31414 100644 --- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java @@ -194,7 +194,7 @@ public class SelectBookmarkFragment extends SubsonicFragment implements AdapterV bookmark.getEntry().getTitle(), Util.formatDuration(bookmark.getPosition() / 1000), formatter.format(bookmark.getCreated()), formatter.format(bookmark.getChanged()), comment); - Util.info(context, R.string.bookmark_details_title, msg); + Util.info(context, R.string.bookmark_details_title, msg, false); } private void deleteBookmark(final Bookmark bookmark) { final MusicDirectory.Entry entry = bookmark.getEntry(); -- cgit v1.2.3