Fix not being able to change from 1st to 3rd semester
This commit is contained in:
parent
86f9afc184
commit
c77ce50f9b
1 changed files with 6 additions and 2 deletions
|
@ -59,13 +59,17 @@ class GradePresenter @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onSemesterSelected(index: Int) {
|
fun onSemesterSelected(index: Int) {
|
||||||
if (selectedIndex != index - 1) {
|
if (selectedIndex != index + 1) {
|
||||||
Timber.i("Change semester in grade view to ${index + 1}")
|
Timber.i("Change semester in grade view to ${index + 1}")
|
||||||
selectedIndex = index + 1
|
selectedIndex = index + 1
|
||||||
selectedSemesterId = availableSemesters[index].semesterId
|
selectedSemesterId = availableSemesters[index].semesterId
|
||||||
loadedSemesterId.clear()
|
loadedSemesterId.clear()
|
||||||
view?.let {
|
view?.let {
|
||||||
it.setCurrentSemesterName(availableSemesters[index].semesterName, availableSemesters[index].start.year, availableSemesters[index].end.year)
|
it.setCurrentSemesterName(
|
||||||
|
availableSemesters[index].semesterName,
|
||||||
|
availableSemesters[index].start.year,
|
||||||
|
availableSemesters[index].end.year
|
||||||
|
)
|
||||||
notifyChildrenSemesterChange()
|
notifyChildrenSemesterChange()
|
||||||
loadChild(it.currentPageIndex)
|
loadChild(it.currentPageIndex)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue