Skip to content

Commit

Permalink
fixed ge search
Browse files Browse the repository at this point in the history
  • Loading branch information
prapooskur committed Aug 21, 2024
1 parent 51afb7e commit 21cd47f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/composeApp/src/commonMain/kotlin/ui/data/ResultsScreenModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ class ResultsScreenModel : ScreenModel {

val useDepartment = (Regex("^[A-Za-z]{2,4}$").matches(department) && departmentList.contains(department.uppercase()))
val useCourseNumber = (Regex("\\d{1,3}[a-zA-Z]?").matches(courseNumber))

val genEd = genEd.toMutableList()
if ("PR" in genEd) {
genEd.remove("PR")
genEd.add("PR-C")
genEd.add("PR-E")
genEd.add("PR-S")
}

if ("PE" in genEd) {
genEd.remove("PE")
genEd.add("PE-E")
genEd.add("PE-H")
genEd.add("PE-T")
}

screenModelScope.launch(Dispatchers.IO) {
try {
// _uiState.update { currentState ->
Expand Down

0 comments on commit 21cd47f

Please sign in to comment.