#99 fix update subject name after edit
This commit is contained in:
parent
de25ed85b5
commit
a7752e5706
1 changed files with 6 additions and 4 deletions
|
@ -75,11 +75,13 @@ class SubjectEditFormViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onEdit(openAndPopUp: (String, String) -> Unit) {
|
fun onEdit(openAndPopUp: (String, String) -> Unit) {
|
||||||
val newSubject = selectedSubject().copy(
|
selectedSubject.set(
|
||||||
name = name,
|
selectedSubject().copy(
|
||||||
argb_color = color,
|
name = name,
|
||||||
|
argb_color = color,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
subjectDAO.updateSubject(newSubject)
|
subjectDAO.updateSubject(selectedSubject())
|
||||||
openAndPopUp(StudeezDestinations.TASKS_SCREEN, StudeezDestinations.EDIT_SUBJECT_FORM)
|
openAndPopUp(StudeezDestinations.TASKS_SCREEN, StudeezDestinations.EDIT_SUBJECT_FORM)
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue