Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Verified Commit cac30678 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

fix: preserve sync enabled/disabled state and sync intervals during SSO migration

When migrating a non-SSO Murena account to use SSO, the sync settings for eDrive, Mail, Notes, Contacts, Calendar, and Tasks were not fully preserved. The sync intervals for Contacts, Calendar and Tasks were also being reset.

To fix this, when an account is migrated to SSO, the following settings are now carried over from the old account to the new one:
- Sync enabled/disabled status for eDrive, Mail, Notes, Contacts, Calendar, and Tasks
- Sync interval for Contacts, Calendar, and Tasks.
- Group method for Contacts.

If it's a new account setup, default sync settings will be applied.

Additionally, the logic for handling CardDAV and CalDAV services during account setup has been updated to:
- For existing accounts being migrated: Update the existing service record in the database with the new authentication state and principal.
- For new accounts: Create a new service record.

This commit also fixed the issue where the sync settings for Contacts, Calendar and Tasks were reset after a device reboot.
parent 7bdc8381
Loading
Loading
Loading
Loading