Make close button work properly in share view
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 21 Feb 2024 10:03:29 +0000 (18:03 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:44 +0000 (16:38 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib

index 6946ff32e3238907ebbe82dd54b254d648e8a7b9..4ffc8f73110eae0228252b055617f33febcff6a8 100644 (file)
@@ -32,4 +32,8 @@ class ShareViewController: NSViewController {
     required init?(coder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
+
+    @IBAction func closeAction(_ sender: Any) {
+        actionViewController.extensionContext.completeRequest()
+    }
 }
index 201ba5ea43401554168ec52d168803cff7765783..10be5ff11a4de18d9efcebb5256bf90b2216b3af 100644 (file)
@@ -68,6 +68,9 @@
                                 <font key="font" metaFont="system"/>
                                 <imageReference key="image" image="xmark.circle.fill" catalog="system" symbolScale="large"/>
                             </buttonCell>
+                            <connections>
+                                <action selector="closeAction:" target="-2" id="D9k-gc-AcN"/>
+                            </connections>
                         </button>
                     </subviews>
                     <constraints>