Skip to content

Commit

Permalink
Corrected range for move operation (#3035)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSVhora authored Apr 11, 2023
1 parent 0c710e2 commit 6b24c17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener, Sea
undoManager.flush()
val first = profiles[from]
var previousOrder = first.userOrder
val (step, range) = if (from < to) Pair(1, from until to) else Pair(-1, to + 1 downTo from)
val (step, range) = if (from < to) Pair(1, from until to) else Pair(-1, from downTo to + 1)
for (i in range) {
val next = profiles[i + step]
val order = next.userOrder
Expand Down

0 comments on commit 6b24c17

Please sign in to comment.