Move the media caption composer (and Add Caption action) behind a feature flag for now. (#3560)

This commit is contained in:
Doug
2024-11-27 06:30:10 +00:00
committed by GitHub
parent ed4063a222
commit a292c41ca5
15 changed files with 39 additions and 11 deletions
@@ -81,6 +81,7 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
timelineViewState: TimelineState(focussedEvent: focussedEventID.map { .init(eventID: $0, appearance: .immediate) }),
ownUserID: roomProxy.ownUserID,
isViewSourceEnabled: appSettings.viewSourceEnabled,
isCreateMediaCaptionsEnabled: appSettings.createMediaCaptionsEnabled,
hideTimelineMedia: appSettings.hideTimelineMedia,
pinnedEventIDs: roomProxy.infoPublisher.value.pinnedEventIDs,
bindings: .init(reactionsCollapsed: [:]),
@@ -447,6 +448,10 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
.weakAssign(to: \.state.isViewSourceEnabled, on: self)
.store(in: &cancellables)
appSettings.$createMediaCaptionsEnabled
.weakAssign(to: \.state.isCreateMediaCaptionsEnabled, on: self)
.store(in: &cancellables)
appSettings.$hideTimelineMedia
.weakAssign(to: \.state.hideTimelineMedia, on: self)
.store(in: &cancellables)