mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Render the live location timeline item (#5209)
* created the data for the timeline item # Conflicts: # ElementX/Sources/Other/Logging/Tracing.swift # ElementX/Sources/Services/Authentication/AuthenticationService.swift # ElementX/Sources/Services/Authentication/LinkNewDeviceService.swift * Implemented the LLS timeline item * updated preview tests * pr and design suggestions * previewscrollview is debug only
This commit is contained in:
@@ -88,7 +88,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
|
||||
let openRoomSpan = analyticsService.signpost.addSpan(.timelineLoad, toTransaction: .openRoom)
|
||||
timeline = try await TimelineProxy(timeline: room.timelineWithConfiguration(configuration: .init(focus: .live(hideThreadedEvents: appSettings.threadsEnabled),
|
||||
filter: .eventFilter(filter: excludedEventsFilter),
|
||||
filter: .eventFilter(filter: Self.excludedEventsFilter(appSettings: appSettings)),
|
||||
internalIdPrefix: nil,
|
||||
dateDividerMode: .daily,
|
||||
trackReadReceipts: .messageLikeEvents,
|
||||
@@ -792,7 +792,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
private let excludedEventsFilter: TimelineEventFilter = {
|
||||
private static func excludedEventsFilter(appSettings: AppSettings) -> TimelineEventFilter {
|
||||
var stateEventFilters: [StateEventType] = [.roomAliases,
|
||||
.roomCanonicalAlias,
|
||||
.roomGuestAccess,
|
||||
@@ -808,6 +808,10 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
.policyRuleServer,
|
||||
.policyRuleUser]
|
||||
|
||||
if !appSettings.liveLocationSharingEnabled {
|
||||
stateEventFilters.append(.beaconInfo)
|
||||
}
|
||||
|
||||
return .excludeEventTypes(eventTypes: stateEventFilters.map { FilterTimelineEventType.state(eventType: $0) })
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user