feat(ios): add iCloud sync toggle, default page size, and default safe mode to Settings#1169
Merged
Conversation
…e mode to Settings
…cts to Settings toggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Settings was sparse: just analytics + Face ID. This PR adds the three most-requested config knobs and threads them through the consumers.
iCloud Sync toggle
@AppStorage("com.TablePro.settings.cloudSyncEnabled")(defaulttrue)TableProMobileApp.scenePhase .active→ skip the auto-syncTaskwhen offConnectionListViewtoolbar Sync button → disables and swapsarrow.triangle.2.circlepath.icloudforicloud.slashwhen offConnectionListViewpull-to-refresh → no-op when offRows per Page (default page size)
@AppStorage("com.TablePro.settings.defaultPageSize")(default100)DataBrowserViewModel.initreads the setting on construction. The toolbar's "Rows per Page" submenu still lets users override per sessionDefault Safe Mode
@AppStorage("com.TablePro.settings.defaultSafeMode")(default.off)SafeModeLevel.allCasesConnectionFormViewModel.init(editing:)applies the default whenediting == nil(new connection); when editing existing, the connection's stored level winsPlumbing
Platform/AppPreferences.swiftenum centralizes the keys, defaults, andpageSizeOptions: [Int]. Both the View (via@AppStorage(AppPreferences.xxxKey)) and the consumers (viaAppPreferences.isCloudSyncEnabled/defaultPageSize/defaultSafeMode) read the same constantsTest plan
icloud.slash. Pull to refresh does nothing. Cold launch with sync off does not callsyncCoordinator.sync. Toggle on → sync resumes immediately