* Make some managers concurrency-safe
- IntentsManager: @MainActor, non-shared, continuation
- SSIDReader: @MainActor, continuation
- Reviewer: main queue, non-shared
* Review wrong use of Concurrency framework
There were background thread calls e.g. in VPNToggle, because
ProfileManager was used inside a VPNManager async call.
Annotate @MainActor wherever a Task involves UI.
* Make main managers MainActor
* Apply MainActor to Mac menus
* [ci skip] Update CHANGELOG
* Set MainActor consistently on Mac menu view models
Move all persisted state out of AppManager to where it really
belongs. To do that, inject a shared KeyValueStore object into
managers that need to persist part of their state in a strongly
typed manner.
Below are persisted states:
- PersistenceManager
- persistenceAuthor
- ProfileManager
- activeProfileId
- UpgradeManager (formerly AppManager)
- didMigrateToV2 (migrate former value)
- VPNManager
- tunnelLogFormat
- masksPrivateData
A similar approach is used for app-specific preferences, by using
a strongly typed enum (AppPreference) together with SwiftUI
@AppStorage property wrapper.
Worth moving logging logic into a specific LogManager.
Finally, drop any former view dependency on AppManager, as states
are now accessed through specific managers.
On configuration error, retain information about the profile that
triggered the error. For now, present an alert, but with this
information the UI can be easily changed later.
- Revert to more "stable" iPad idiom
- Set accent color the proper way
- Use .tint when available
- Unify navigation style by idiom
- Retain navigation bars in sidebar/detail
- Lighten sidebar appearance
- Fix Menu style (dropdown -> button)
- Use native Picker (dropdown)
- Use switch toggles rather than checkboxes
- Replace .actionSheet with .alert
- Increase minimum row height
CAVEAT: on Mac with iPad idiom, having a Section in .sidebar
produces artifacts. Header keeps changing height for no reason.
Retain Section on iPad multitasking only to not break navigation.
On iOS 14, Organizer scrolls abruptly on profile selection. It
looks like this was introduced by merging ProfilesList into
OrganizerView.
Try to revert merge to split observation responsibilities.
Drop unused AppManager in +Scene along the way.
Flashing on activation was caused by VPNManager.disable() in
ProfileView+VPN, because by setting lastError to nil it would
notify a change to ProfileRow (via VPNStateView) during the
profile row activation animation. That caused the flicker.
Instead, disable VPN first, then start the animation.
Anyway, avoid clearing a nil lastError.
- Drop unused AppManager from OrganizerView
- Do not notify ProfileManager subscribers on activeProfileId
Saved active profile is already notified by:
- Core Data
- AppManager
- Move Localizable.strings above to share *.lproj folders
- Reorg menus into contextual/system
- Shorten titles of contextual menus
- Update sharing message with WireGuard
- Drop AlternativeTo
7 phrases left to translate into 9 languages.