private void TryUpdateProfile(string oldId, string newId, ProfileData data) { if (oldId != newId) { _profiles.Rename(oldId, newId); _ui.SetProfiles(_profiles.Names, newId); } _profiles.UpdateData(newId, data); }