diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-07-28 11:46:59 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-07-28 11:46:59 -0700 |
commit | 87e4567756c2f52f5ebd873c32740d5f06d8899b (patch) | |
tree | 39271e944e48a3218fcb54d78c09a2253fe8da94 /src | |
parent | 24114e5fa36ede829664553525354395c1aaffe6 (diff) | |
download | dsub-87e4567756c2f52f5ebd873c32740d5f06d8899b.tar.gz dsub-87e4567756c2f52f5ebd873c32740d5f06d8899b.tar.bz2 dsub-87e4567756c2f52f5ebd873c32740d5f06d8899b.zip |
#371 Automatically remove cancel imageTask if set
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/view/UpdateView.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/view/UpdateView.java b/src/github/daneren2005/dsub/view/UpdateView.java index 9a04d911..9bcf5d08 100644 --- a/src/github/daneren2005/dsub/view/UpdateView.java +++ b/src/github/daneren2005/dsub/view/UpdateView.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.WeakHashMap;
+import github.daneren2005.dsub.util.ImageLoader;
import github.daneren2005.dsub.R;
public class UpdateView extends LinearLayout {
@@ -53,6 +54,7 @@ public class UpdateView extends LinearLayout { protected boolean shaded = false;
protected boolean starred = false;
protected boolean isStarred = false;
+ protected ImageLoader.ImageTask imageTask = null;
protected final boolean autoUpdate;
@@ -85,6 +87,11 @@ public class UpdateView extends LinearLayout { update();
}
public void setObject(Object obj1, Object obj2) {
+ if(imageTask != null) {
+ imageTask.cancel();
+ imageTask = null;
+ }
+
setObjectImpl(obj1, obj2);
backgroundHandler.post(new Runnable() {
@Override
|