mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Fix cancel not hiding toast view
This commit is contained in:
1 parent
15677b7843
commit
0b94a888b5
1 file changed
+9
-1
@@ -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)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user