passepartout-apple/PassepartoutCore/Sources/PassepartoutProfiles
Davide De Rosa 14b42fbea5 Persist managers state to generic key-value store
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.
2022-06-16 13:42:37 +02:00
..
DataModels Hack around missing .ethernet on Catalyst 2022-04-19 15:56:41 +02:00
Extensions Duplicate profile from context menu 2022-04-26 22:39:47 +02:00
Managers Persist managers state to generic key-value store 2022-06-16 13:42:37 +02:00
Models Fix handling of non-ready profiles 2022-05-03 15:54:19 +02:00
Pickers Make network settings consistent 2022-04-14 07:43:44 +02:00
Profiles.xcdatamodeld/Model.xcdatamodel Rewrite app in SwiftUI 2022-04-12 15:12:45 +02:00
Repositories Reuse base fetch request building code 2022-05-05 10:58:25 +02:00
PassepartoutProfiles.swift Rewrite app in SwiftUI 2022-04-12 15:12:45 +02:00