diff --git a/Example/NivelirExample/Services/Profile/DefaultProfileService.swift b/Example/NivelirExample/Services/Profile/DefaultProfileService.swift index 57148ca9..254530d5 100644 --- a/Example/NivelirExample/Services/Profile/DefaultProfileService.swift +++ b/Example/NivelirExample/Services/Profile/DefaultProfileService.swift @@ -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) { @@ -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 diff --git a/Sources/Addons/BottomSheet/Interaction/BottomSheetInteractionController.swift b/Sources/Addons/BottomSheet/Interaction/BottomSheetInteractionController.swift index b7be9429..c40ea9fe 100644 --- a/Sources/Addons/BottomSheet/Interaction/BottomSheetInteractionController.swift +++ b/Sources/Addons/BottomSheet/Interaction/BottomSheetInteractionController.swift @@ -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() } }