mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
RoomTimeline… refactor (drop the Room). (#3728)
* Add the timeline controller factory to the timeline view model. In preparation for building a timeline to swipe through media in QuickLook. * Refactor RoomTimelineControllerFactory. * Refactor RoomTimelineController. * Refactor RoomTimelineProvider.
This commit is contained in:
@@ -182,14 +182,15 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func messageFilteredTimeline(allowedMessageTypes: [RoomMessageEventMessageType]) async -> Result<any TimelineProxyProtocol, RoomProxyError> {
|
||||
func messageFilteredTimeline(allowedMessageTypes: [RoomMessageEventMessageType],
|
||||
presentation: TimelineKind.MediaPresentation) async -> Result<any TimelineProxyProtocol, RoomProxyError> {
|
||||
do {
|
||||
let sdkTimeline = try await room.timelineWithConfiguration(configuration: .init(focus: .live,
|
||||
allowedMessageTypes: .only(types: allowedMessageTypes),
|
||||
internalIdPrefix: nil,
|
||||
dateDividerMode: .monthly))
|
||||
|
||||
let timeline = TimelineProxy(timeline: sdkTimeline, kind: .media(.mediaFilesScreen))
|
||||
let timeline = TimelineProxy(timeline: sdkTimeline, kind: .media(presentation))
|
||||
await timeline.subscribeForUpdates()
|
||||
|
||||
return .success(timeline)
|
||||
|
||||
@@ -78,7 +78,8 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
|
||||
func timelineFocusedOnEvent(eventID: String, numberOfEvents: UInt16) async -> Result<TimelineProxyProtocol, RoomProxyError>
|
||||
|
||||
func messageFilteredTimeline(allowedMessageTypes: [RoomMessageEventMessageType]) async -> Result<TimelineProxyProtocol, RoomProxyError>
|
||||
func messageFilteredTimeline(allowedMessageTypes: [RoomMessageEventMessageType],
|
||||
presentation: TimelineKind.MediaPresentation) async -> Result<TimelineProxyProtocol, RoomProxyError>
|
||||
|
||||
func enableEncryption() async -> Result<Void, RoomProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user