Groups sorting fixes

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-09-27 18:40:44 +02:00
parent dbe5ea7e99
commit 42953d1ed2
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
2 changed files with 3 additions and 1 deletions

View File

@ -300,7 +300,7 @@ const actions = {
* @returns {Promise}
*/
async getContactsFromAddressBook(context, { addressbook }) {
return addressbook.dav.findAllAndFilterBySimpleProperties(['EMAIL', 'UID', 'CATEGORIES', 'FN', 'ORG'])
return addressbook.dav.findAllAndFilterBySimpleProperties(['EMAIL', 'UID', 'CATEGORIES', 'FN', 'ORG', 'N'])
.then((response) => {
// We don't want to lose the url information
// so we need to parse one by one

View File

@ -146,6 +146,8 @@ export default {
counter: group.contacts.length
}
}
}).sort(function(a, b) {
return parseInt(b.utils.counter) - parseInt(a.utils.counter)
})
},