From b4fd20dae84ff6e8500dd378a996b7cceee8a422 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 18 Mar 2024 20:14:22 +0800 Subject: [PATCH] Fix default states around passwords for share options view Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareOptionsView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift index 401f013ff..4b64d2e08 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift @@ -126,7 +126,7 @@ class ShareOptionsView: NSView { setAllFields(enabled: true) let type = pickedShareType() - shareRecipientTextField.isHidden = type != .publicLink + shareRecipientTextField.isHidden = type == .publicLink if let caps = dataSource?.shareCapabilities { uploadEditPermissionCheckbox.state = @@ -137,7 +137,7 @@ class ShareOptionsView: NSView { case .publicLink: passwordProtectCheckbox.isHidden = false passwordProtectCheckbox.state = caps.publicLink.enforcePassword ? .on : .off - passwordProtectCheckbox.isEnabled = !caps.publicLink.enforceExpireDate + passwordProtectCheckbox.isEnabled = !caps.publicLink.enforcePassword expirationDateCheckbox.state = caps.publicLink.enforceExpireDate ? .on : .off expirationDateCheckbox.isEnabled = !caps.publicLink.enforceExpireDate expirationDatePicker.dateValue = Date( @@ -151,6 +151,8 @@ class ShareOptionsView: NSView { passwordProtectCheckbox.isHidden = !caps.email.passwordEnabled passwordProtectCheckbox.state = caps.email.passwordEnforced ? .on : .off default: + passwordProtectCheckbox.isHidden = true + passwordProtectCheckbox.state = .off break } } -- 2.30.2