diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-11-13 21:42:59 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-11-13 21:42:59 -0800 |
commit | 91ae1cb01082cac99a2c1cdfc68c5cb9d82fffbe (patch) | |
tree | 97ecb425e4d3c49244f4af736fc4c4a8e5c35554 | |
parent | 1beb0b0e7e3b164ad24546929b41542c19e500f3 (diff) | |
download | dsub-91ae1cb01082cac99a2c1cdfc68c5cb9d82fffbe.tar.gz dsub-91ae1cb01082cac99a2c1cdfc68c5cb9d82fffbe.tar.bz2 dsub-91ae1cb01082cac99a2c1cdfc68c5cb9d82fffbe.zip |
Fix web commit
-rw-r--r-- | src/github/daneren2005/dsub/fragments/DownloadFragment.java | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java | 18 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index 41096b9a..91fda9b1 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -814,7 +814,7 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe boolean jukeboxEnabled = getDownloadService() != null && getDownloadService().isRemoteEnabled();
jukeboxButton.setTextColor(jukeboxEnabled ? COLOR_BUTTON_ENABLED : COLOR_BUTTON_DISABLED);
- if(Util.isOffline) {
+ if(Util.isOffline(context)) {
bookmarkButton.setVisibility(View.GONE);
} else {
bookmarkButton.setVisibility(View.VISIBLE);
diff --git a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java index 97e3c2c8..47069266 100644 --- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java @@ -18,6 +18,7 @@ */ package github.daneren2005.dsub.fragments; +import android.content.DialogInterface; import android.os.Bundle; import android.util.Log; import android.view.ContextMenu; @@ -36,8 +37,11 @@ import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.service.DownloadService; import github.daneren2005.dsub.service.MusicService; import github.daneren2005.dsub.service.MusicServiceFactory; +import github.daneren2005.dsub.service.OfflineException; +import github.daneren2005.dsub.service.ServerTooOldException; import github.daneren2005.dsub.util.BackgroundTask; import github.daneren2005.dsub.util.Constants; +import github.daneren2005.dsub.util.LoadingTask; import github.daneren2005.dsub.util.TabBackgroundTask; import github.daneren2005.dsub.util.Util; import github.daneren2005.dsub.view.BookmarkAdapter; @@ -118,10 +122,10 @@ public class SelectBookmarkFragment extends SubsonicFragment implements AdapterV Bookmark bookmark = bookmarks.get(info.position); switch(menuItem.getItemId()) { - case R.bookmark_menu_info: + case R.id.bookmark_menu_info: displayBookmarkInfo(bookmark); break; - case R.bookmark_menu_delete: + case R.id.bookmark_menu_delete: deleteBookmark(bookmark); break; } @@ -181,10 +185,14 @@ public class SelectBookmarkFragment extends SubsonicFragment implements AdapterV private void displayBookmarkInfo(final Bookmark bookmark) { Format formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - + String comment = bookmark.getComment(); + if(comment == null) { + comment = ""; + } + String msg = context.getResources().getString(R.string.bookmark_details, - song.getTitle(), Util.formatDuration(bookmark.getPosition), - formatter.format(bookmark.getCreated()), formatter.format(bookmark.getChanged()), bookmark.getComment()); + 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); } |