Force a period uniformity check when initializing EntryAdapter

This fixes a bug where the progress bar was not shown upon unlock.
We'll come up with a better solution later. This is just a hot fix.
This commit is contained in:
Alexander Bakker 2019-05-22 00:09:45 +02:00
parent 99c222cffa
commit 9f3ccdc508

View file

@ -93,7 +93,7 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
public void addEntries(List<DatabaseEntry> entries) {
_entries.addAll(entries);
updateShownEntries();
checkPeriodUniformity();
checkPeriodUniformity(true);
}
public void removeEntry(DatabaseEntry entry) {
@ -308,8 +308,12 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
}
private void checkPeriodUniformity() {
checkPeriodUniformity(false);
}
private void checkPeriodUniformity(boolean force) {
boolean uniform = isPeriodUniform();
if (uniform == _isPeriodUniform) {
if (!force && uniform == _isPeriodUniform) {
return;
}
_isPeriodUniform = uniform;