feat: enable trusted-senders address book sync by default when contacts are available

This commit is contained in:
Linus Rath
2026-07-09 13:59:52 +02:00
parent 38313639ed
commit c47137fb49
3 changed files with 14 additions and 3 deletions
+7
View File
@@ -280,6 +280,13 @@ function initializeFeatureStores(client: IJMAPClient): void {
contactStore.setSupportsSync(true);
contactStore.fetchAddressBooks(client).catch((err) => debug.error('Failed to fetch address books:', err));
contactStore.fetchContacts(client).catch((err) => debug.error('Failed to fetch contacts:', err));
// Default trusted-sender syncing on when contacts are available, unless the
// user has already made an explicit choice (`null` = not yet decided).
const settings = useSettingsStore.getState();
if (settings.trustedSendersAddressBook === null) {
settings.updateSetting('trustedSendersAddressBook', true);
}
} else {
useContactStore.getState().setSupportsSync(false);
}