From 644ee02fea69823a3b287d66048534da9c692bfe Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Tue, 19 Nov 2019 08:40:12 +0100
Subject: Sort users and groups first in sharing input
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
---
 apps/files_sharing/src/components/SharingInput.vue | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'apps/files_sharing/src/components/SharingInput.vue')

diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue
index df222eafe0c..c80bb02c6bc 100644
--- a/apps/files_sharing/src/components/SharingInput.vue
+++ b/apps/files_sharing/src/components/SharingInput.vue
@@ -207,8 +207,12 @@ export default {
 			// remove invalid data and format to user-select layout
 			const exactSuggestions = this.filterOutExistingShares(rawExactSuggestions)
 				.map(share => this.formatForMultiselect(share))
+				// sort by type so we can get user&groups first...
+				.sort((a, b) => a.shareType - b.shareType)
 			const suggestions = this.filterOutExistingShares(rawSuggestions)
 				.map(share => this.formatForMultiselect(share))
+				// sort by type so we can get user&groups first...
+				.sort((a, b) => a.shareType - b.shareType)
 
 			// lookup clickable entry
 			const lookupEntry = []
-- 
cgit v1.2.3

