Fix call to notifyItemMoved when entry change causes sort change

This fixes an issue introduced in ffcbaffcfc
pull/1017/head
Alexander Bakker 3 years ago
parent 0ee74bfeb2
commit c27d080a11

@ -223,7 +223,7 @@ public class EntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
Comparator<VaultEntry> comparator = _sortCategory.getComparator();
if (comparator != null) {
Collections.sort(_shownEntries, comparator);
int newPosition = Collections.binarySearch(_shownEntries, newEntry, comparator);
int newPosition = _shownEntries.indexOf(newEntry);
if (position != newPosition) {
notifyItemMoved(position, newPosition);
}

Loading…
Cancel
Save