mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
removed images in pills in favour of text decos
FIX fix
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ final class CompletionSuggestionService: CompletionSuggestionServiceProtocol {
|
||||
|
||||
if canMentionAllUsers,
|
||||
!roomProxy.isDirectOneToOneRoom,
|
||||
Self.shouldIncludeMember(userID: PillConstants.atRoom, displayName: PillConstants.everyone, searchText: suggestionTrigger.text) {
|
||||
Self.shouldIncludeMember(userID: PillUtilities.atRoom, displayName: PillUtilities.everyone, searchText: suggestionTrigger.text) {
|
||||
membersSuggestion
|
||||
.insert(SuggestionItem(suggestionType: .allUsers(roomProxy.details.avatar), range: suggestionTrigger.range, rawSuggestionText: suggestionTrigger.text), at: 0)
|
||||
}
|
||||
|
||||
+3
-3
@@ -49,7 +49,7 @@ struct SuggestionItem: Identifiable, Equatable {
|
||||
case .user(let user):
|
||||
user.id
|
||||
case .allUsers:
|
||||
PillConstants.atRoom
|
||||
PillUtilities.atRoom
|
||||
case .room(let room):
|
||||
room.id
|
||||
}
|
||||
@@ -58,7 +58,7 @@ struct SuggestionItem: Identifiable, Equatable {
|
||||
var displayName: String {
|
||||
switch suggestionType {
|
||||
case .allUsers:
|
||||
return PillConstants.everyone
|
||||
return PillUtilities.everyone
|
||||
case .user(let user):
|
||||
return user.displayName ?? user.id
|
||||
case .room(let room):
|
||||
@@ -69,7 +69,7 @@ struct SuggestionItem: Identifiable, Equatable {
|
||||
var subtitle: String? {
|
||||
switch suggestionType {
|
||||
case .allUsers:
|
||||
return PillConstants.atRoom
|
||||
return PillUtilities.atRoom
|
||||
case .user(let user):
|
||||
return user.displayName == nil ? nil : user.id
|
||||
case .room(let room):
|
||||
|
||||
@@ -413,7 +413,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
// Remove the attribute so it doesn't get inherited by the new string
|
||||
attributedString.removeAttribute(.MatrixAllUsersMention, range: range)
|
||||
|
||||
attributedString.replaceCharacters(in: range, with: PillConstants.atRoom)
|
||||
attributedString.replaceCharacters(in: range, with: PillUtilities.atRoom)
|
||||
containsAtRoom = true
|
||||
|
||||
stop.pointee = true
|
||||
@@ -464,7 +464,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
|
||||
let attributedString: NSMutableAttributedString
|
||||
// This is the all room mention special case
|
||||
if urlString == PillConstants.composerAtRoomURLString {
|
||||
if urlString == PillUtilities.composerAtRoomURLString {
|
||||
attributedString = NSMutableAttributedString(string: string, attributes: [.MatrixAllUsersMention: true])
|
||||
} else {
|
||||
attributedString = NSMutableAttributedString(string: string, attributes: [.link: URL(string: urlString) as Any])
|
||||
|
||||
Reference in New Issue
Block a user