Promote gallery messages to labs

This commit is contained in:
Stefan Ceriu
2026-09-02 11:28:36 +03:00
parent 8752897bc3
commit 6839258111
7 changed files with 21 additions and 7 deletions
@@ -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.";
@@ -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.";
+4
View File
@@ -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.
@@ -36,6 +36,7 @@ struct LabsScreenViewStateBindings {
protocol LabsOptionsProtocol: AnyObject {
var threadsEnabled: Bool { get set }
var galleryEnabled: Bool { get set }
}
extension AppSettings: LabsOptionsProtocol { }
@@ -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
@@ -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 }
@@ -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.")