mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-28 04:06:57 +02:00
Display additional command content in suggestion list
This commit is contained in:
+6
-2
@@ -25,7 +25,9 @@ struct RoomMembersProviderMember {
|
||||
}
|
||||
|
||||
struct CommandsProviderCommand {
|
||||
var name: String
|
||||
let name: String
|
||||
let parametersFormat: String
|
||||
let description: String
|
||||
}
|
||||
|
||||
class CompletionSuggestionUserID: NSObject {
|
||||
@@ -50,6 +52,8 @@ struct CompletionSuggestionServiceUserItem: CompletionSuggestionUserItemProtocol
|
||||
|
||||
struct CompletionSuggestionServiceCommandItem: CompletionSuggestionCommandItemProtocol {
|
||||
let name: String
|
||||
let parametersFormat: String
|
||||
let description: String
|
||||
}
|
||||
|
||||
class CompletionSuggestionService: CompletionSuggestionServiceProtocol {
|
||||
@@ -165,7 +169,7 @@ class CompletionSuggestionService: CompletionSuggestionServiceProtocol {
|
||||
guard let self else { return }
|
||||
|
||||
self.suggestionItems = commands.map { command in
|
||||
CompletionSuggestionItem.command(value: CompletionSuggestionServiceCommandItem(name: command.name))
|
||||
CompletionSuggestionItem.command(value: CompletionSuggestionServiceCommandItem(name: command.name, parametersFormat: command.parametersFormat, description: command.description))
|
||||
}
|
||||
|
||||
self.items.send(self.suggestionItems.filter { item in
|
||||
|
||||
+2
@@ -26,6 +26,8 @@ protocol CompletionSuggestionUserItemProtocol: Avatarable {
|
||||
|
||||
protocol CompletionSuggestionCommandItemProtocol {
|
||||
var name: String { get }
|
||||
var parametersFormat: String { get }
|
||||
var description: String { get }
|
||||
}
|
||||
|
||||
enum CompletionSuggestionItem {
|
||||
|
||||
Reference in New Issue
Block a user