mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
fix images disappearing when in recyclerviews
Fixes #3142 Closes #3288 // FREEBIE
This commit is contained in:
parent
bd2e984963
commit
bb6b86ad59
@ -166,6 +166,7 @@ public class ConversationItem extends LinearLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void unbind() {
|
public void unbind() {
|
||||||
|
mediaThumbnail.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MessageRecord getMessageRecord() {
|
public MessageRecord getMessageRecord() {
|
||||||
|
@ -53,11 +53,6 @@ public class ThumbnailView extends ForegroundImageView {
|
|||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void onDetachedFromWindow() {
|
|
||||||
Glide.clear(this);
|
|
||||||
super.onDetachedFromWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImageResource(@Nullable MasterSecret masterSecret,
|
public void setImageResource(@Nullable MasterSecret masterSecret,
|
||||||
long id, long timestamp,
|
long id, long timestamp,
|
||||||
@NonNull ListenableFutureTask<SlideDeck> slideDeckFuture)
|
@NonNull ListenableFutureTask<SlideDeck> slideDeckFuture)
|
||||||
@ -97,6 +92,10 @@ public class ThumbnailView extends ForegroundImageView {
|
|||||||
this.thumbnailClickListener = listener;
|
this.thumbnailClickListener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
if (isContextValid()) Glide.clear(this);
|
||||||
|
}
|
||||||
|
|
||||||
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1)
|
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1)
|
||||||
private boolean isContextValid() {
|
private boolean isContextValid() {
|
||||||
return !(getContext() instanceof Activity) ||
|
return !(getContext() instanceof Activity) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user