aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-07-28 09:36:31 -0700
committerScott Jackson <daneren2005@gmail.com>2014-07-28 09:36:31 -0700
commit3e2998185b9cdd9c5cf4a87ce5b3bea866b89a55 (patch)
tree06dae74a99e147283a49f5ba6d44d7638d54ac39 /src/github/daneren2005
parent5d69bd22ac248db21273a6811184d0d300953150 (diff)
downloaddsub-3e2998185b9cdd9c5cf4a87ce5b3bea866b89a55.tar.gz
dsub-3e2998185b9cdd9c5cf4a87ce5b3bea866b89a55.tar.bz2
dsub-3e2998185b9cdd9c5cf4a87ce5b3bea866b89a55.zip
Only update bottom bar if revision updates
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index 9845411a..33adcb37 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -80,6 +80,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
private TextView artistView;
private ImageButton startButton;
private long lastBackPressTime = 0;
+ private long currentRevision = -1;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -406,11 +407,19 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
}
private void update() {
- if (getDownloadService() == null) {
+ DownloadService downloadService = getDownloadService();
+ if (downloadService == null) {
return;
}
+
+ long revision = downloadService.getDownloadListUpdateRevision();
+ if(currentRevision == revision) {
+ return;
+ } else {
+ currentRevision = revision;
+ }
- DownloadFile current = getDownloadService().getCurrentPlaying();
+ DownloadFile current = downloadService.getCurrentPlaying();
if(current == null) {
trackView.setText("Title");
artistView.setText("Artist");