Fix suggestion labels for sharees

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-04-06 18:04:34 +08:00
parent db20e44850
commit 66f77233a8

View file

@ -48,6 +48,12 @@ class ShareeSuggestionsDataSource: SuggestionsDataSource {
} }
private func suggestionsFromSharees(_ sharees: [NKSharee]) -> [Suggestion] { 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 } // TODO: Improve img
} }