Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
juicyfru1t committed Oct 2, 2024
1 parent 1d28f96 commit cd8e3d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ final class DefaultProfileService: ProfileService, Sendable {
guard intervalCount.value <= 100 else {
timer.invalidate()

Task {
await MainActor.run {
progress(1.0)
}
Task { @MainActor in
progress(1.0)
}

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
Expand All @@ -54,10 +52,8 @@ final class DefaultProfileService: ProfileService, Sendable {
return
}

Task {
await MainActor.run {
progress(self.intervalCount.value * 0.01)
}
Task { @MainActor in
progress(self.intervalCount.value * 0.01)
}

intervalCount.value += 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ internal final class BottomSheetInteractionController: NSObject {
state = .starting

simultaneousScrollObservation = simultaneousScrollView?.observe(\.contentOffset) { [weak self] _, _ in
Task {
await self?.resetSimultaneousScrollIfNeeded()
MainActor.assumeIsolated {
self?.resetSimultaneousScrollIfNeeded()
}
}

Expand Down

0 comments on commit cd8e3d0

Please sign in to comment.