diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js index d94ef7d1d..131a92988 100644 --- a/dev/View/Popup/Contacts.js +++ b/dev/View/Popup/Contacts.js @@ -43,7 +43,7 @@ export class ContactsPopupView extends AbstractViewPopup { contactsPage: 1, - viewSaving: false, + isSaving: false, hasChanges: false, @@ -103,7 +103,7 @@ export class ContactsPopupView extends AbstractViewPopup { // close: self => !self.hasChanges(), deleteCommand: self => 0 < self.contactsCheckedOrSelected().length, newMessageCommand: self => 0 < self.contactsCheckedOrSelected().length, - saveCommand: self => !self.viewSaving() && !self.hasChanges(), + saveCommand: self => !self.isSaving() && !self.hasChanges(), syncCommand: self => !self.contacts.syncing() && !self.contacts.importing() }); } @@ -173,31 +173,17 @@ export class ContactsPopupView extends AbstractViewPopup { } saveCommand() { - this.viewSaving(true); - - const - contact = this.contact(), - requestUid = Jua.randomId(); - + this.isSaving(true); + const contact = this.contact(); Remote.request('ContactSave', (iError, oData) => { - let res = false; - this.viewSaving(false); - - if (!iError - && oData.Result.RequestUid === requestUid - && oData.Result.ResultID - ) { + this.isSaving(false); + if (!iError && oData.Result.ResultID) { contact.id(oData.Result.ResultID); this.reloadContactList(); // TODO: remove when e-contact-foreach is dynamic - res = true; - } - - if (res) { this.hasChanges(false); } }, { - RequestUid: requestUid, Contact: contact // Uid: contact.id(), // jCard: contact.jCard @@ -208,7 +194,6 @@ export class ContactsPopupView extends AbstractViewPopup { syncCommand() { ContactUserStore.sync(iError => { iError && alert(getNotification(iError)); - this.reloadContactList(true); }); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Contacts.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Contacts.php index 1d3a62e71..e1511fdef 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Contacts.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Contacts.php @@ -98,8 +98,7 @@ trait Contacts $bResult = false; $oAddressBookProvider = $this->AddressBookProvider($oAccount); - $sRequestUid = \trim($this->GetActionParam('RequestUid', '')); - if ($oAddressBookProvider && $oAddressBookProvider->IsActive() && \strlen($sRequestUid)) { + if ($oAddressBookProvider && $oAddressBookProvider->IsActive()) { $aContact = $this->GetActionParam('Contact'); if (\is_array($aContact) && isset($aContact['Uid'], $aContact['jCard'])) { $vCard = \Sabre\VObject\Reader::readJson($aContact['jCard']); @@ -118,7 +117,6 @@ trait Contacts } return $this->DefaultResponse(__FUNCTION__, array( - 'RequestUid' => $sRequestUid, 'ResultID' => $bResult ? $oContact->id : '', 'Result' => $bResult )); diff --git a/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html b/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html index e7b1bac12..4a71f7135 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html @@ -11,28 +11,28 @@ 🗑