Skip to content

Commit

Permalink
Fix picker :3
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonCat4012 committed Jan 6, 2024
1 parent d2c51a8 commit 63317af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Calq/Screens/NewGradeScreen/NewGradeVM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class NewGradeVM: ObservableObject, SegmentedPickerViewDelegate {
isNewGradeSheetPresented = true

year = Util.lastActiveYear(selectedSubject!)
pickerVM.selectedIndex = year - 1
points = Float(Util.getSubjectAverage(selectedSubject!))
gradeName = ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class SubjectDetailViewModel: ObservableObject, SegmentedPickerViewDelegate {
pickerVM.delegate = self

selectedYear = Util.lastActiveYear(subject)
pickerVM.selectedIndex = selectedYear - 1
update()
}

Expand Down

0 comments on commit 63317af

Please sign in to comment.