- Do the profile loading inside the model
- Allow setting current profile to a transient profile
- Check .placeholder before saving current profile
XXX: avoid loading active profile on iPad portrait.
ProfileView is not interested in changes in other profiles
notified by ProfileManager. Set isLoading inside
ObservableObject for observable to be self-contained.
Loses observation of profile deletion, but dismiss on removal is
actually handled by OrganizerView, not ProfileView.
Also drop unused presentationMode.
Make action sync, but internally async (makeProfileReady). If not
doing so, UI on launch will not be able to show active profile
immediately. WelcomeView would appear for a moment.
Observe isReloadingCurrentProfile.
See 2b1efb8fec
- Drop unused AppManager from OrganizerView
- Do not notify ProfileManager subscribers on activeProfileId
Saved active profile is already notified by:
- Core Data
- AppManager
Swipe to delete. Address a couple things on iPad though:
1. Also check provider availability before showing view
fatalError hit on iPad when navigating from a ready provider
profile to a non-ready one. Similar to when navigating between
different VPN protocols.
2. Suppress assertion on deleted profile
Deleting current profile via swipe seems to re-render a new
NavigationLink with the deleted profile, which results in
loading a deleted profile and hitting the assertion. Not sure if
this is a programming error or a glitch in ForEach.