aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/view/ArtistView.java46
1 files changed, 6 insertions, 40 deletions
diff --git a/src/github/daneren2005/dsub/view/ArtistView.java b/src/github/daneren2005/dsub/view/ArtistView.java
index 249c1ae2..81c11abb 100644
--- a/src/github/daneren2005/dsub/view/ArtistView.java
+++ b/src/github/daneren2005/dsub/view/ArtistView.java
@@ -43,12 +43,6 @@ public class ArtistView extends UpdateView {
private File file;
private TextView titleView;
- private ImageButton starButton;
- private ImageView moreButton;
-
- private boolean exists = false;
- private boolean shaded = false;
- private boolean starred = true;
public ArtistView(Context context) {
super(context);
@@ -64,44 +58,16 @@ public class ArtistView extends UpdateView {
}
});
}
-
- public void setArtist(Artist artist) {
- this.artist = artist;
- titleView.setText(artist.getName());
+
+ protected void setObjectImpl(Object obj) {
+ this.artist = (Artist) obj;
+ titleView.setText(artist.getName());
file = FileUtil.getArtistDirectory(context, artist);
- updateBackground();
- update();
}
@Override
protected void updateBackground() {
- exists = file.exists();
- }
-
- @Override
- protected void update() {
- if(artist.isStarred()) {
- if(!starred) {
- starButton.setVisibility(View.VISIBLE);
- starred = true;
- }
- } else {
- if(starred) {
- starButton.setVisibility(View.GONE);
- starred = false;
- }
- }
-
- if(exists) {
- if(!shaded) {
- moreButton.setImageResource(R.drawable.list_item_more_shaded);
- shaded = true;
- }
- } else {
- if(shaded) {
- moreButton.setImageResource(R.drawable.list_item_more);
- shaded = false;
- }
- }
+ exists = file.exists();
+ isStarred = artist.isStarred();
}
}