Removed Pill Avatar + @room is not displayed among suggestions for DM (#1968)

* removed pill avatar

* completion suggestion service shows @room as first and only if not a DM

* code improvement
This commit is contained in:
Mauro
2023-10-27 09:29:20 +02:00
committed by GitHub
parent aa766f2eac
commit 24835a566e
11 changed files with 50 additions and 55 deletions
@@ -102,9 +102,9 @@ final class CompletionSuggestionServiceTests: XCTestCase {
try await deferred.fulfill()
deferred = deferFulfillment(service.suggestionsPublisher) { suggestions in
suggestions == [.user(item: .init(id: alice.userID, displayName: alice.displayName, avatarURL: alice.avatarURL)),
.user(item: .init(id: bob.userID, displayName: bob.displayName, avatarURL: bob.avatarURL)),
.allUsers(item: .allUsersMention(roomAvatar: nil))]
suggestions == [.allUsers(item: .allUsersMention(roomAvatar: nil)),
.user(item: .init(id: alice.userID, displayName: alice.displayName, avatarURL: alice.avatarURL)),
.user(item: .init(id: bob.userID, displayName: bob.displayName, avatarURL: bob.avatarURL))]
}
service.setSuggestionTrigger(.init(type: .user, text: ""))
try await deferred.fulfill()