Auto-reset mappings when address book is changed in profile editor
When editing a profile and switching to a different Starface address book, the old contact mappings are invalid (different Starface IDs). Now automatically clears mappings and shows a notification. Custom address books are already listed as tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab9c16c69a
commit
65d3e911d0
|
|
@ -333,9 +333,23 @@ namespace StarfaceOutlookSync.UI
|
|||
};
|
||||
|
||||
if (_isNew)
|
||||
{
|
||||
_pm.AddProfile(profile);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wenn Adressbuch gewechselt wurde, Mappings zuruecksetzen
|
||||
if (_existingProfile.StarfaceAddressBook?.TagId != profile.StarfaceAddressBook?.TagId
|
||||
|| _existingProfile.StarfaceAddressBook?.Type != profile.StarfaceAddressBook?.Type)
|
||||
{
|
||||
_pm.SaveMappings(profile.Id, new List<SyncMapping>());
|
||||
profile.LastSync = "";
|
||||
MessageBox.Show(
|
||||
"Adressbuch wurde geaendert.\nSync-Zuordnungen wurden automatisch zurueckgesetzt.",
|
||||
"Adressbuch geaendert", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
_pm.UpdateProfile(profile);
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue