Sort credentials based on name

Use the full name for sorting,
including issuer prefixes.

Fixes #136
This commit is contained in:
Dag Heyman 2017-03-28 11:02:27 +02:00
parent 37a187373f
commit 2c6bba3add
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338

View File

@ -370,6 +370,13 @@ ApplicationWindow {
}
}
}
// Sort credentials based on the
// full name, including the issuer prefix
result.sort(function (a, b) {
return a.name.localeCompare(b.name)
})
// If the search gave some results,
// the top credential should be selected.
if (result[0] !== null && search.text.length > 0) {