mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Reset bound message ID when view is recycled.
This commit is contained in:
@@ -121,4 +121,9 @@ public abstract class BaseThreadItemViewHolder<I extends ThreadItem>
|
|||||||
return textView.getContext();
|
return textView.getContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onViewRecycled() {
|
||||||
|
// Reset the bound message ID so an asynchronous text loading task
|
||||||
|
// won't set the view's text while it's in the recycling pool
|
||||||
|
boundMessageId = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,6 +140,12 @@ public class ThreadItemAdapter<I extends ThreadItem>
|
|||||||
return getItem(position);
|
return getItem(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewRecycled(BaseThreadItemViewHolder<I> viewHolder) {
|
||||||
|
super.onViewRecycled(viewHolder);
|
||||||
|
viewHolder.onViewRecycled();
|
||||||
|
}
|
||||||
|
|
||||||
public interface ThreadItemListener<I> {
|
public interface ThreadItemListener<I> {
|
||||||
|
|
||||||
void onReplyClick(I item);
|
void onReplyClick(I item);
|
||||||
|
|||||||
Reference in New Issue
Block a user