Revert "lineage-sdk self-removing prefs: move reap from onBindViewHolder to onAttached"

This reverts commit 027b615325.

While it served its original purpose, this was causing bad side-effects
when using our constraints (verified at least with requiresConfig and
requiresAction). Moving the reap to onAttached was rendering self-removing
prefs useless because if the view isn't loaded yet, the preference
(which also doesn't yet exists) can't really be hidden.

Change-Id: Ic61fe4b9979412d89c55ea1543c494e69bf6eab7
This commit is contained in:
Bruno Martins
2017-12-03 22:03:02 +00:00
parent 8c4872f801
commit 9f648b7046
5 changed files with 11 additions and 29 deletions

View File

@@ -43,12 +43,6 @@ public class SelfRemovingListPreference extends ListPreference {
mConstraints = new ConstraintsHelper(context, null, this);
}
@Override
public void onAttached() {
super.onAttached();
mConstraints.onAttached();
}
@Override
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);