diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java | 13 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/view/SongView.java | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java index 3febfaea..ac8b44d6 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java @@ -379,6 +379,19 @@ public class DownloadFile implements BufferFile { return "DownloadFile (" + song + ")"; } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + DownloadFile downloadFile = (DownloadFile) o; + return Util.equals(this.getSong(), downloadFile.getSong()); + } + private class DownloadTask extends SilentBackgroundTask<Void> { private MusicService musicService; diff --git a/app/src/main/java/github/daneren2005/dsub/view/SongView.java b/app/src/main/java/github/daneren2005/dsub/view/SongView.java index 13620715..2bcef2b3 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/SongView.java +++ b/app/src/main/java/github/daneren2005/dsub/view/SongView.java @@ -20,6 +20,7 @@ package github.daneren2005.dsub.view; import android.content.Context; import android.graphics.Color; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.*; @@ -247,7 +248,7 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> { rightImage = false; } - boolean playing = downloadService.getCurrentPlaying() == downloadFile; + boolean playing = Util.equals(downloadService.getCurrentPlaying(), downloadFile); if (playing) { if(!this.playing) { this.playing = playing; |