Skip to content

Commit

Permalink
Expose the public search feature flag in the developer settings and d…
Browse files Browse the repository at this point in the history
…isable it by default.
  • Loading branch information
stefanceriu committed Nov 18, 2024
1 parent 18cbbe4 commit 6b6420a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ElementX/Sources/Application/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ final class AppSettings {

// MARK: - Feature Flags

@UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: isDevelopmentBuild, storageType: .volatile)
@UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: false, storageType: .userDefaults(store))
var publicSearchEnabled

@UserPreference(key: UserDefaultsKeys.fuzzyRoomListSearchEnabled, defaultValue: false, storageType: .userDefaults(store))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enum DeveloperOptionsScreenViewAction {
protocol DeveloperOptionsProtocol: AnyObject {
var logLevel: TracingConfiguration.LogLevel { get set }
var slidingSyncDiscovery: AppSettings.SlidingSyncDiscovery { get set }
var publicSearchEnabled: Bool { get set }
var hideUnreadMessagesBadge: Bool { get set }
var fuzzyRoomListSearchEnabled: Bool { get set }
var hideTimelineMedia: Bool { get set }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ struct DeveloperOptionsScreen: View {
}

Section("Room List") {
Toggle(isOn: $context.publicSearchEnabled) {
Text("Public search")
}

Toggle(isOn: $context.hideUnreadMessagesBadge) {
Text("Hide grey dots")
}
Expand Down

0 comments on commit 6b6420a

Please sign in to comment.