From 0b94a888b5ec032eb6e4ef6fecc1fd50a20acc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6ttger?= Date: Thu, 19 Feb 2026 21:29:36 +0100 Subject: [PATCH] Fix cancel not hiding toast view --- QuickDrop/ViewModel/ReceiveModel.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/QuickDrop/ViewModel/ReceiveModel.swift b/QuickDrop/ViewModel/ReceiveModel.swift index e000ba6..3d5c28d 100644 --- a/QuickDrop/ViewModel/ReceiveModel.swift +++ b/QuickDrop/ViewModel/ReceiveModel.swift @@ -457,8 +457,16 @@ class ReceiveModel: ObservableObject, InboundAppDelegate { let contentView = QuickDropToastHostView( receiveModel: self, - onCancel: { + onCancel: { [weak self] in NearbyConnectionManager.shared.cancelTransfer(id: connectionID) + guard let self else { return } + self.processes.removeValue(forKey: connectionID) + if self.processes.isEmpty { + self.progress = nil + } + self.toastActions = nil + self.consentState = nil + self.hideQuickDropToast(style: .fade) } )