* Move ComposerToolbar files to withing the RoomScreen folder (as it's not a screen on its own) * Switch the plain composer to NSAttributedStrings * Enable suggestions on the plain composer * Introduce a new `MatrixUserDisplayName` attributed string attributed and use it for mention building * Implement mention pill rendering and sending on the plain message composer * Fix plain composer snapshot tests * Fix broken formatting options layout * Add clarifying comment.
32 lines
1020 B
Swift
32 lines
1020 B
Swift
//
|
|
// Copyright 2022 New Vector Ltd
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct AttributedStringBuilderComponent: Hashable, Identifiable {
|
|
let id: String
|
|
let attributedString: AttributedString
|
|
let isBlockquote: Bool
|
|
}
|
|
|
|
protocol AttributedStringBuilderProtocol {
|
|
func fromPlain(_ string: String?) -> AttributedString?
|
|
|
|
func fromHTML(_ htmlString: String?) -> AttributedString?
|
|
|
|
func detectPermalinks(_ attributedString: NSMutableAttributedString)
|
|
}
|