summaryrefslogtreecommitdiffstats
path: root/core/src/views
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-04 18:15:09 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-05 11:37:45 +0200
commitd98f7c1bd83fc03fd297ebeac6279ffe17316950 (patch)
tree4f1f261e1033f441a0deaa30f5aeb56cbbb51c43 /core/src/views
parent71b62c4203a25beefeab73f73668919c813e3a50 (diff)
downloadnextcloud-server-d98f7c1bd83fc03fd297ebeac6279ffe17316950.tar.gz
nextcloud-server-d98f7c1bd83fc03fd297ebeac6279ffe17316950.zip
Make apps handle the order logic
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src/views')
-rw-r--r--core/src/views/UnifiedSearch.vue13
1 files changed, 1 insertions, 12 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue
index d7ad58ae202..4e32bdbedd1 100644
--- a/core/src/views/UnifiedSearch.vue
+++ b/core/src/views/UnifiedSearch.vue
@@ -169,18 +169,7 @@ export default {
orderedResults() {
const ordered = {}
Object.keys(this.results)
- .sort((a, b) => {
- if (a.startsWith(activeApp) && b.startsWith(activeApp)) {
- return this.typesMap[a].order - this.typesMap[b].order
- }
- if (a.startsWith(activeApp)) {
- return -1
- }
- if (b.startsWith(activeApp)) {
- return 1
- }
- return 0
- })
+ .sort((a, b) => this.typesMap[a].order - this.typesMap[b].order)
.forEach(type => {
ordered[type] = this.results[type]
})