]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Fix suggestion labels for sharees
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Sat, 6 Apr 2024 10:04:34 +0000 (18:04 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:39:04 +0000 (16:39 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift

index 66c637ab4b5ba8b883645a448bc021300e05d5aa..cf5c5c9236b1fd187bcc1e7d26183cc1058b07d0 100644 (file)
@@ -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
 }