fix(addressbook(js)): load selected cards prior to display mail editor

This commit is contained in:
Francis Lachapelle
2021-09-21 14:42:05 -04:00
parent 9c493e004b
commit c6d6dc3e66
2 changed files with 23 additions and 3 deletions
@@ -850,8 +850,10 @@
* @param {promise} futureHeadersData - a promise of the metadata of some cards
*/
AddressBook.prototype.$unwrapHeaders = function(futureHeadersData) {
var _this = this;
var _this = this,
deferred = AddressBook.$q.defer();
this.$futureHeadersData = deferred.promise;
futureHeadersData.then(function(data) {
AddressBook.$timeout(function() {
var headers, j;
@@ -867,8 +869,13 @@
}
});
}
deferred.resolve(_this.$cards);
});
}, function() {
deferred.reject();
});
return this.$futureHeadersData;
};
/**