Make sure network error is shown in UI instead of generic error
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 18:07:48 +0000 (02:07 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 18 Apr 2024 05:13:11 +0000 (05:13 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareTableViewDataSource.swift

index 70aeb8c50a7c07141b7806e18f216bae1388f406..3cca1d1a9df5189b00d8e854b43091eac3f32738 100644 (file)
@@ -99,6 +99,7 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
             account = convertedAccount
             await sharesTableView?.deselectAll(self)
             capabilities = await fetchCapabilities()
+            guard capabilities != nil else { return }
             guard capabilities?.filesSharing?.apiEnabled == true else {
                 presentError("Server does not support shares.")
                 return