1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 18:27:43 +00:00

Revert "Clear recycled views"

This reverts commit 88705707fd.
This commit is contained in:
M66B 2019-10-10 12:00:19 +02:00
parent 4adb2ae492
commit 015db693d5

View file

@ -634,7 +634,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} }
} }
private void clear(boolean loading) { private void clear() {
ivAvatarStart.setVisibility(View.GONE); ivAvatarStart.setVisibility(View.GONE);
ivAvatarEnd.setVisibility(View.GONE); ivAvatarEnd.setVisibility(View.GONE);
vwColor.setVisibility(View.GONE); vwColor.setVisibility(View.GONE);
@ -660,7 +660,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvPreview.setVisibility(View.GONE); tvPreview.setVisibility(View.GONE);
tvError.setVisibility(View.GONE); tvError.setVisibility(View.GONE);
ibHelp.setVisibility(View.GONE); ibHelp.setVisibility(View.GONE);
pbLoading.setVisibility(loading ? View.VISIBLE : View.GONE); pbLoading.setVisibility(View.VISIBLE);
clearExpanded(null); clearExpanded(null);
} }
@ -4035,7 +4035,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
holder.unwire(); holder.unwire();
if (message == null || context == null) if (message == null || context == null)
holder.clear(true); holder.clear();
else { else {
holder.bindTo(message); holder.bindTo(message);
holder.wire(); holder.wire();
@ -4050,11 +4050,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
holder.powner.recreate(); holder.powner.recreate();
} }
@Override
public void onViewRecycled(@NonNull ViewHolder holder) {
holder.clear(false);
}
void setSelectionTracker(SelectionTracker<Long> selectionTracker) { void setSelectionTracker(SelectionTracker<Long> selectionTracker) {
this.selectionTracker = selectionTracker; this.selectionTracker = selectionTracker;
} }