mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
This commit introduces a new device profile system, moving away from a single "main device" configuration in `GeneralSettings`. Key changes: - `DeviceProfilesRepo` now manages a list of `DeviceProfile` objects, allowing for multiple device configurations. - On first launch with this update, existing "main device" settings from `GeneralSettings` (address, model, keys, signal quality) are migrated into a new default `AppleDeviceProfile`. - The `MonitorWorker`, `PopUpReaction`, `AutoConnect`, and `PodHistoryRepo` have been updated to use the new `DeviceProfilesRepo` instead of the old `GeneralSettings` for device-specific information. - `AppleFactory` now uses `DeviceProfilesRepo` to find matching profiles based on IRK. - `TroubleShooterFragmentVM` now interacts with `DeviceProfilesRepo` for profile management during troubleshooting. - The `create` method in `ApplePodsFactory` and its implementations are now `suspend` functions to allow for asynchronous operations like fetching profiles from the repository. - Old "main device" preference keys in `GeneralSettings` have been renamed with an "old" prefix and will be removed in a future update. - A new `currentProfiles()` extension function provides a convenient way to get the current list of profiles.