diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index c3047fd13..69f9e51e4 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -950,6 +950,8 @@ "screen_knock_requests_list_empty_state_title" = "No pending request to join"; "screen_knock_requests_list_initial_loading_title" = "Loading requests to join…"; "screen_knock_requests_list_title" = "Requests to join"; +"screen_labs_enable_gallery" = "Gallery messages"; +"screen_labs_enable_gallery_description" = "Send multiple images or videos in one go. Stable on mobile, but not yet supported by web."; "screen_labs_enable_threads" = "Enable thread replies"; "screen_labs_enable_threads_description" = "The app will restart to apply this change."; "screen_labs_header_description" = "Try out our latest ideas in development. These features are not finalized; they may be unstable, may change."; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index f866d381f..60373b822 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -950,6 +950,8 @@ "screen_knock_requests_list_empty_state_title" = "No pending request to join"; "screen_knock_requests_list_initial_loading_title" = "Loading requests to join…"; "screen_knock_requests_list_title" = "Requests to join"; +"screen_labs_enable_gallery" = "Gallery messages"; +"screen_labs_enable_gallery_description" = "Send multiple images or videos in one go. Stable on mobile, but not yet supported by web."; "screen_labs_enable_threads" = "Enable thread replies"; "screen_labs_enable_threads_description" = "The app will restart to apply this change."; "screen_labs_header_description" = "Try out our latest ideas in development. These features are not finalised; they may be unstable, may change."; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 4bcb3b248..7a151c840 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2224,6 +2224,10 @@ internal nonisolated enum L10n { internal static var screenKnockRequestsListInitialLoadingTitle: String { return L10n.tr("Localizable", "screen_knock_requests_list_initial_loading_title") } /// Requests to join internal static var screenKnockRequestsListTitle: String { return L10n.tr("Localizable", "screen_knock_requests_list_title") } + /// Gallery messages + internal static var screenLabsEnableGallery: String { return L10n.tr("Localizable", "screen_labs_enable_gallery") } + /// Send multiple images or videos in one go. Stable on mobile, but not yet supported by web. + internal static var screenLabsEnableGalleryDescription: String { return L10n.tr("Localizable", "screen_labs_enable_gallery_description") } /// Enable thread replies internal static var screenLabsEnableThreads: String { return L10n.tr("Localizable", "screen_labs_enable_threads") } /// The app will restart to apply this change. diff --git a/ElementX/Sources/Screens/LabsScreen/LabsScreenModels.swift b/ElementX/Sources/Screens/LabsScreen/LabsScreenModels.swift index 6dff16fef..2ed04ae0f 100644 --- a/ElementX/Sources/Screens/LabsScreen/LabsScreenModels.swift +++ b/ElementX/Sources/Screens/LabsScreen/LabsScreenModels.swift @@ -36,6 +36,7 @@ struct LabsScreenViewStateBindings { protocol LabsOptionsProtocol: AnyObject { var threadsEnabled: Bool { get set } + var galleryEnabled: Bool { get set } } extension AppSettings: LabsOptionsProtocol { } diff --git a/ElementX/Sources/Screens/LabsScreen/View/LabsScreen.swift b/ElementX/Sources/Screens/LabsScreen/View/LabsScreen.swift index fbb0dd5b9..3929cc798 100644 --- a/ElementX/Sources/Screens/LabsScreen/View/LabsScreen.swift +++ b/ElementX/Sources/Screens/LabsScreen/View/LabsScreen.swift @@ -16,6 +16,7 @@ struct LabsScreen: View { Form { header threadsSection + gallerySection } .compoundList() .navigationTitle(L10n.screenLabsTitle) @@ -59,6 +60,17 @@ struct LabsScreen: View { context.send(viewAction: .clearCache) } } + + private var gallerySection: some View { + Section { + ListRow(label: .default(title: L10n.screenLabsEnableGallery, + icon: \.image), + kind: .toggle($context.galleryEnabled)) + } footer: { + Text(L10n.screenLabsEnableGalleryDescription) + .compoundListSectionFooter() + } + } } // MARK: - Previews diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index 6cfd3f5bf..3fac901b4 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -68,8 +68,6 @@ protocol DeveloperOptionsProtocol: AnyObject { var linkPreviewsEnabled: Bool { get set } - var galleryEnabled: Bool { get set } - var jumpToReadMarkerEnabled: Bool { get set } var linkNewDeviceEnabled: Bool { get set } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index 7928c5eb3..f660c637b 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -97,11 +97,6 @@ struct DeveloperOptionsScreen: View { .foregroundStyle(.compound.textCriticalPrimary) } - Toggle(isOn: $context.galleryEnabled) { - Text("Gallery messages") - Text("Allows sending multiple media in a single message. Received galleries always render regardless of this setting.") - } - Toggle(isOn: $context.jumpToReadMarkerEnabled) { Text("Jump to unread") Text("Adds a button to jump to the read marker, plus a presence dot on the scroll-to-bottom button when new messages arrive while scrolled away.")