Skip to content

Commit

Permalink
fix: update task priority
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanStepanok committed Nov 23, 2024
1 parent 74b3f5f commit f694ae7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ public final class CourseContainerViewModel: BaseCourseViewModel {
.sink { [weak self] state in
guard let self else { return }
if case .progress = state { return }
Task(priority: .background) {
Task {
debugLog(state, "--- state ---")
await self.setDownloadsStates(courseStructure: self.courseStructure)
await self.getDownloadingProgress()
Expand Down
2 changes: 1 addition & 1 deletion Course/Course/Presentation/Offline/OfflineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct OfflineView: View {
&& ((viewModel.totalFilesSize - viewModel.downloadedFilesSize != 0)
|| (viewModel.totalFilesSize == 0 && viewModel.downloadedFilesSize == 0)) {
Button(action: {
Task(priority: .low) {
Task {
switch viewModel.downloadAllButtonState {
case .start:
await viewModel.downloadAll()
Expand Down

0 comments on commit f694ae7

Please sign in to comment.