diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-09-21 07:07:11 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-09-21 07:07:11 +0200 |
commit | 7fda82f86a2e6bf8f35eb5c54d9a3b2f3e26edd2 (patch) | |
tree | 9dcb169480c0293e8a33838ef013fabe2699511e /js | |
parent | 9f805bdf4a18328ccf58d1562d6dcae9825f04d5 (diff) |
Fix #345
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/components/contactDetails/contactDetails_controller.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/js/components/contactDetails/contactDetails_controller.js b/js/components/contactDetails/contactDetails_controller.js index ca64648d..1a368cc2 100644 --- a/js/components/contactDetails/contactDetails_controller.js +++ b/js/components/contactDetails/contactDetails_controller.js @@ -3,7 +3,8 @@ angular.module('contactsApp') var ctrl = this; - ctrl.loading = true; + ctrl.init = true; + ctrl.loading = false; ctrl.show = false; ctrl.clearContact = function() { @@ -25,7 +26,8 @@ angular.module('contactsApp') download : t('contacts', 'Download'), delete : t('contacts', 'Delete'), save : t('contacts', 'Save changes'), - addressBook : t('contacts', 'Address book') + addressBook : t('contacts', 'Address book'), + loading : t('contacts', 'Waiting for the contact list to load...') }; ctrl.fieldDefinitions = vCardPropertiesService.fieldDefinitions; @@ -41,7 +43,7 @@ angular.module('contactsApp') return book.displayName === ctrl.contact.addressBookId; }); } - ctrl.loading = false; + ctrl.init = false; // Start watching for ctrl.uid when we have addressBooks, as they are needed for fetching // full details. $scope.$watch('ctrl.uid', function(newValue) { @@ -56,6 +58,7 @@ angular.module('contactsApp') $('#app-navigation-toggle').removeClass('showdetails'); return; } + ctrl.loading = true; ContactService.getById(ctrl.addressBooks, uid).then(function(contact) { if (angular.isUndefined(contact)) { ctrl.clearContact(); @@ -63,6 +66,7 @@ angular.module('contactsApp') } ctrl.contact = contact; ctrl.show = true; + ctrl.loading = false; $('#app-navigation-toggle').addClass('showdetails'); ctrl.addressBook = _.find(ctrl.addressBooks, function(book) { |