Skip to content

Commit

Permalink
fix warning note appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasr22 committed Jan 16, 2025
1 parent dd88e4c commit 8c51d1d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions BrightIntosh/UI/BrightIntoshStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ struct BrightIntoshStoreView: View {
} else {
Spacer()
ProgressView()
.task {
await delayNotLoadingRestartNote()
.onAppear {
Task {
await delayNotLoadingRestartNote()
}
}
Spacer()
}
Expand Down Expand Up @@ -133,9 +135,15 @@ struct BrightIntoshStoreView: View {
}

private func delayNotLoadingRestartNote() async {
try? await Task.sleep(nanoseconds: 6_000_000_000)
do {
try await Task.sleep(nanoseconds: 6_000_000_000)
} catch {
return
}
withAnimation {
showRestartNoteDueToSpinner = true
if storeManager.products.isEmpty {
showRestartNoteDueToSpinner = true
}
}
}
}
Expand Down

0 comments on commit 8c51d1d

Please sign in to comment.