Group share suggestions by userid
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
a1c6e44700
commit
06d8438fda
|
@ -312,6 +312,12 @@
|
|||
|
||||
var suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup);
|
||||
|
||||
function dynamicSort(property) {
|
||||
return function (a,b) {
|
||||
return (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
var grouped = suggestions.sort(dynamicSort('uuid'));
|
||||
var moreResultsAvailable =
|
||||
(
|
||||
oc_config['sharing.maxAutocompleteResults'] > 0
|
||||
|
@ -328,7 +334,7 @@
|
|||
)
|
||||
);
|
||||
|
||||
deferred.resolve(suggestions, exactMatches, moreResultsAvailable);
|
||||
deferred.resolve(grouped, exactMatches, moreResultsAvailable);
|
||||
} else {
|
||||
deferred.reject(result.ocs.meta.message);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue