feat: also refresh groups list in schedule
This commit is contained in:
@@ -160,6 +160,9 @@ class ScheduleViewModel(
|
|||||||
fun refresh() {
|
fun refresh() {
|
||||||
val groupId = currentGroupId ?: return
|
val groupId = currentGroupId ?: return
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
|
_uiState.value = _uiState.value.copy(isLoading = true, loadError = false)
|
||||||
|
// Обновляем список групп: так подхватываются новые PDF (периоды), появившиеся на сайте.
|
||||||
|
runCatching { groupRepository.forceRefresh() }
|
||||||
loadSchedule(groupId)
|
loadSchedule(groupId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user