Fix student auto selection if there is already active some students logged (#2314)

This commit is contained in:
Mikołaj Pich 2023-10-02 12:20:34 +02:00 committed by GitHub
parent d70568c446
commit d1d665bbdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 11 deletions

View File

@ -13,7 +13,7 @@ jobs:
environment: google-play
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
@ -49,7 +49,7 @@ jobs:
environment: app-gallery
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

View File

@ -19,7 +19,7 @@ jobs:
environment: app-center
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
@ -89,7 +89,7 @@ jobs:
if: github.event_name != 'pull_request_target'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

View File

@ -19,7 +19,7 @@ jobs:
- uses: fkirc/skip-duplicate-actions@master
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
@ -45,7 +45,7 @@ jobs:
- uses: fkirc/skip-duplicate-actions@master
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
@ -71,7 +71,7 @@ jobs:
- uses: fkirc/skip-duplicate-actions@master
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

View File

@ -98,11 +98,13 @@ class LoginStudentSelectPresenter @Inject constructor(
}
}
}
return students.filter { student ->
student.student.semesters.any { semester ->
semester.isCurrent()
return students
.filter { it.isEnabled }
.filter { student ->
student.student.semesters.any { semester ->
semester.isCurrent()
}
}
}
}
private fun createItems(): List<LoginStudentSelectItem> = buildList {