fix: ssl error & offline teacher schedule

This commit is contained in:
2026-10-07 21:55:53 +03:00
parent af1f374b95
commit ae0fea1ea6
8 changed files with 89 additions and 13 deletions
@@ -146,7 +146,15 @@ class PickerViewModel(
syncJob = viewModelScope.launch {
try {
teacherScheduleRepository.syncPeriod(today).collect { progress ->
_uiState.value = _uiState.value.copy(syncProgress = progress)
_uiState.value = _uiState.value.copy(
syncProgress = progress,
error = if (progress.failed > 0) {
"Не удалось загрузить расписание: ${progress.failed} из " +
"${progress.total} кафедр. Проверьте подключение к интернету."
} else {
_uiState.value.error
}
)
}
} catch (e: CancellationException) {
throw e