Add tap to reveal preference to results

This commit is contained in:
Michael Schättgen 2019-03-25 21:40:08 +01:00
parent 0e6828fae1
commit d57fc8b79a
2 changed files with 7 additions and 7 deletions

View file

@ -159,7 +159,9 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
recreate();
} else if (data.getBooleanExtra("needsRefresh", false)) {
boolean showAccountName = getPreferences().isAccountNameVisible();
boolean tapToReveal = getPreferences().isTapToRevealEnabled();
_entryListView.setShowAccountName(showAccountName);
_entryListView.setTapToReveal(tapToReveal);
_entryListView.refresh(true);
}
}

View file

@ -126,13 +126,11 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
}
public void refresh(boolean hard) {
if (!_tapToReveal) {
if (hard) {
notifyDataSetChanged();
} else {
for (EntryHolder holder : _holders) {
holder.refreshCode();
}
if (hard) {
notifyDataSetChanged();
} else {
for (EntryHolder holder : _holders) {
holder.refreshCode();
}
}
}