Highlight selected conversation

This commit is contained in:
M66B
2020-05-15 16:26:34 +02:00
parent 72aac8ef90
commit e9c206c2e3
2 changed files with 24 additions and 2 deletions

View File

@@ -1444,6 +1444,21 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
values.get(name).add(id);
} else
values.get(name).remove(id);
if ("selected".equals(name) && enabled) {
int pos = adapter.getPositionForKey(id);
if (pos != NO_POSITION)
adapter.notifyItemChanged(pos);
for (Long other : new ArrayList<>(values.get("selected")))
if (!other.equals(id)) {
values.get(name).remove(other);
pos = adapter.getPositionForKey(other);
if (pos != NO_POSITION)
adapter.notifyItemChanged(pos);
}
}
}
@Override