mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Pills performance improvements (#1891)
* big performance improvement for pills * small overall performance improvement * code improvements
This commit is contained in:
@@ -925,3 +925,16 @@ private struct ReplyInfo {
|
||||
let type: EventBasedMessageTimelineItemContentType
|
||||
let isThread: Bool
|
||||
}
|
||||
|
||||
private struct RoomContextKey: EnvironmentKey {
|
||||
@MainActor
|
||||
static let defaultValue = RoomScreenViewModel.mock.context
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
/// Used to access and inject and access the room context without observing it
|
||||
var roomContext: RoomScreenViewModel.Context {
|
||||
get { self[RoomContextKey.self] }
|
||||
set { self[RoomContextKey.self] = newValue }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user