mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-06-08 15:47:47 +00:00
Fix call to notifyItemMoved when entry change causes sort change
This fixes an issue introduced in ffcbaffcfc
This commit is contained in:
parent
0ee74bfeb2
commit
c27d080a11
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ public class EntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
Comparator<VaultEntry> comparator = _sortCategory.getComparator();
|
Comparator<VaultEntry> comparator = _sortCategory.getComparator();
|
||||||
if (comparator != null) {
|
if (comparator != null) {
|
||||||
Collections.sort(_shownEntries, comparator);
|
Collections.sort(_shownEntries, comparator);
|
||||||
int newPosition = Collections.binarySearch(_shownEntries, newEntry, comparator);
|
int newPosition = _shownEntries.indexOf(newEntry);
|
||||||
if (position != newPosition) {
|
if (position != newPosition) {
|
||||||
notifyItemMoved(position, newPosition);
|
notifyItemMoved(position, newPosition);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue