mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-25 16:41:44 +00:00
macOS: silent weak ownership difference warnings
UpdateViewModel doesn't own the Task, we don't actually need it here.
This commit is contained in:
@@ -24,10 +24,10 @@ struct UpdatePill: View {
|
||||
.onChange(of: model.state) { newState in
|
||||
resetTask?.cancel()
|
||||
if case .notFound(let notFound) = newState {
|
||||
resetTask = Task { [weak model] in
|
||||
resetTask = Task {
|
||||
try? await Task.sleep(for: .seconds(5))
|
||||
guard !Task.isCancelled, case .notFound? = model?.state else { return }
|
||||
model?.state = .idle
|
||||
guard !Task.isCancelled, case .notFound = model.state else { return }
|
||||
model.state = .idle
|
||||
notFound.acknowledgement()
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user