From eedd0b8f754e347bc8e794cf8f18a5dc652dce1e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sat, 6 Apr 2024 18:04:34 +0800 Subject: [PATCH] Fix suggestion labels for sharees Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareeSuggestionsDataSource.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift index 66c637ab4..cf5c5c923 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift @@ -48,6 +48,12 @@ class ShareeSuggestionsDataSource: SuggestionsDataSource { } private func suggestionsFromSharees(_ sharees: [NKSharee]) -> [Suggestion] { - sharees.map { Suggestion(imageName: "person.fill", displayText: $0.name, data: $0) } + return sharees.map { + Suggestion( + imageName: "person.fill", + displayText: $0.label.isEmpty ? $0.name : $0.label, + data: $0 + ) + } } // TODO: Improve img } -- 2.30.2