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
@@ -22,10 +22,12 @@ struct MediaUploadPreviewScreen: View {
.id(context.viewState.url)
.ignoresSafeArea(edges: [.horizontal])
.safeAreaInset(edge: .bottom, spacing: 0) {
composer
.padding(.horizontal, 12)
.padding(.vertical, 16)
.background() // Don't use compound so we match the QLPreviewController.
if context.viewState.showMediaCaptionComposer {
composer
.padding(.horizontal, 12)
.padding(.vertical, 16)
.background() // Don't use compound so we match the QLPreviewController.
}
}
.navigationTitle(title)
.navigationBarTitleDisplayMode(.inline)
@@ -156,7 +158,8 @@ struct MediaUploadPreviewScreen_Previews: PreviewProvider, TestablePreview {
roomProxy: JoinedRoomProxyMock(),
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: ServiceLocator.shared.settings),
title: "App Icon.png",
url: snapshotURL)
url: snapshotURL,
createMediaCaptionsEnabled: true)
static var previews: some View {
NavigationStack {
MediaUploadPreviewScreen(context: viewModel.context)