Refactor roster item positioning
The following discussion from !860 (merged) should be addressed:
-
@lnj started a discussion: I think this function has two different use-cases. Can you make two separate functions out of it?
positionToInsert(RosterItem) -> int
newItemPosition(int currentIndex) -> int
Maybe you can also avoid the
newPosition - 1
above by doing that in the function then?And is it correct that
beginMoveRows()
always usesnewPosition
butm_items.move()
usesnewPosition - 1
in some cases?