Enable iPad multi-column navigation by default

This commit is contained in:
Shadowfacts 2024-04-15 11:00:36 -04:00
parent 00c44c612f
commit c43c951b92
3 changed files with 14 additions and 13 deletions

View File

@ -29,7 +29,11 @@ struct TrailingSwipeActionsKey: MigratablePreferenceKey {
} }
struct WidescreenNavigationModeKey: MigratablePreferenceKey { struct WidescreenNavigationModeKey: MigratablePreferenceKey {
static var defaultValue: WidescreenNavigationMode { .splitScreen } static var defaultValue: WidescreenNavigationMode { .multiColumn }
static func shouldMigrate(oldValue: WidescreenNavigationMode) -> Bool {
oldValue != .splitScreen
}
} }
struct AttachmentBlurModeKey: MigratablePreferenceKey { struct AttachmentBlurModeKey: MigratablePreferenceKey {

View File

@ -8,6 +8,5 @@
import Foundation import Foundation
public enum FeatureFlag: String, Codable { public enum FeatureFlag: String, Codable {
case iPadMultiColumn = "ipad-multi-column"
case iPadBrowserNavigation = "ipad-browser-navigation" case iPadBrowserNavigation = "ipad-browser-navigation"
} }

View File

@ -42,17 +42,15 @@ struct WidescreenNavigationPrefsView: View {
Text("Split Screen") Text("Split Screen")
} }
if preferences.hasFeatureFlag(.iPadMultiColumn) { Spacer(minLength: 32)
Spacer(minLength: 32)
OptionView( OptionView(
content: MultiColumnNavigationPreview.self, content: MultiColumnNavigationPreview.self,
value: .multiColumn, value: .multiColumn,
selection: $preferences.widescreenNavigationMode, selection: $preferences.widescreenNavigationMode,
startAnimation: startAnimationSignal startAnimation: startAnimationSignal
) { ) {
Text("Multi-Column") Text("Multi-Column")
}
} }
Spacer() Spacer()