Promote knocking to labs

This commit is contained in:
Stefan Ceriu
2026-09-02 11:28:36 +03:00
parent 6839258111
commit 2ae8b9bf75
7 changed files with 21 additions and 6 deletions
@@ -37,6 +37,7 @@ struct LabsScreenViewStateBindings {
protocol LabsOptionsProtocol: AnyObject {
var threadsEnabled: Bool { get set }
var galleryEnabled: Bool { get set }
var knockingEnabled: Bool { get set }
}
extension AppSettings: LabsOptionsProtocol { }
@@ -17,6 +17,7 @@ struct LabsScreen: View {
header
threadsSection
gallerySection
knockingSection
}
.compoundList()
.navigationTitle(L10n.screenLabsTitle)
@@ -71,6 +72,17 @@ struct LabsScreen: View {
.compoundListSectionFooter()
}
}
private var knockingSection: some View {
Section {
ListRow(label: .default(title: L10n.screenLabsEnableKnocking,
icon: \.askToJoin),
kind: .toggle($context.knockingEnabled))
} footer: {
Text(L10n.screenLabsEnableKnockingDescription)
.compoundListSectionFooter()
}
}
}
// MARK: - Previews
@@ -64,7 +64,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
var fuzzyRoomListSearchEnabled: Bool { get set }
var lowPriorityFilterEnabled: Bool { get set }
var mentionsFilterEnabled: Bool { get set }
var knockingEnabled: Bool { get set }
var linkPreviewsEnabled: Bool { get set }
@@ -101,11 +101,6 @@ struct DeveloperOptionsScreen: View {
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.")
}
Toggle(isOn: $context.knockingEnabled) {
Text("Knocking")
Text("Ask to join rooms")
}
}
Section {