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
@@ -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.")