Fix cancel not hiding toast view

This commit is contained in:
Leon Böttger committed 2026-02-19 21:29:36 +01:00
1 parent 15677b7843
commit 0b94a888b5
1 file changed
+9 -1
+9 -1
View File
@@ -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)
}
)