Skip to content

Commit 5764c89

Browse files
cleanup the code
1 parent 77fbffa commit 5764c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/features/sorting/insertion/view_model/insertion_sort_notifier.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class InsertionSortNotifier extends SortingNotifier {
1212

1313
while (j > 0 && arr[j] < arr[j - 1]) {
1414
steps.add(SortingStep(index1: j, index2: j - 1, action: SortingStatus.compared));
15-
steps.add(SortingStep(index1: j, index2: j - 1, action: SortingStatus.swiping));
15+
steps.add(SortingStep(index1: j, index2: j - 1, action: SortingStatus.swapping));
1616

1717
arr.swap(j, j - 1);
18-
steps.add(SortingStep(index1: j, index2: j - 1, action: SortingStatus.swiped));
18+
steps.add(SortingStep(index1: j, index2: j - 1, action: SortingStatus.swapped));
1919
j--;
2020
}
2121
steps.add(SortingStep(index1: j, index2: j, action: SortingStatus.sorted));

0 commit comments

Comments
 (0)