|
|
@ -320,7 +320,7 @@ angular.module('myApp.services', []) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
.service('PhonebookContactsService', function ($q, $modal, $sce) { |
|
|
|
.service('PhonebookContactsService', function ($q, $modal, $sce, FileManager) { |
|
|
|
|
|
|
|
|
|
|
|
var phonebookContactsPromise; |
|
|
|
var phonebookContactsPromise; |
|
|
|
|
|
|
|
|
|
|
@ -376,9 +376,12 @@ angular.module('myApp.services', []) |
|
|
|
contact.phones.push(this.result.tel[i].value); |
|
|
|
contact.phones.push(this.result.tel[i].value); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.result.photo) { |
|
|
|
if (this.result.photo && this.result.photo[0]) { |
|
|
|
contact.photo = URL.createObjectURL(this.result.photo[0]); |
|
|
|
try { |
|
|
|
} else { |
|
|
|
contact.photo = FileManager.getUrl(this.result.photo[0]); |
|
|
|
|
|
|
|
} catch (e) {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!contact.photo) { |
|
|
|
contact.photo = 'img/placeholders/UserAvatar' + ((Math.abs(count) % 8) + 1) + '@2x.png'; |
|
|
|
contact.photo = 'img/placeholders/UserAvatar' + ((Math.abs(count) % 8) + 1) + '@2x.png'; |
|
|
|
} |
|
|
|
} |
|
|
|
contact.photo = $sce.trustAsResourceUrl(contact.photo); |
|
|
|
contact.photo = $sce.trustAsResourceUrl(contact.photo); |
|
|
|