Merge pull request #37878 from 2lar/sortingfixbranch

pull/44574/head
John Molakvoæ 2 years ago committed by GitHub
commit 3da69fca60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      apps/files_sharing/src/views/SharingTab.vue
  2. 4
      dist/6880-6880.js
  3. 0
      dist/6880-6880.js.license
  4. 1
      dist/6880-6880.js.map
  5. 1
      dist/6880-6880.js.map.license
  6. 1
      dist/9549-9549.js.map
  7. 1
      dist/9549-9549.js.map.license
  8. 4
      dist/files_sharing-files_sharing_tab.js
  9. 2
      dist/files_sharing-files_sharing_tab.js.map

@ -260,11 +260,16 @@ export default {
*/
processShares({ data }) {
if (data.ocs && data.ocs.data && data.ocs.data.length > 0) {
// create Share objects and sort by newest
// create Share objects and sort by title in alphabetical order and then by creation time
const shares = data.ocs.data
.map(share => new Share(share))
.sort((a, b) => b.createdTime - a.createdTime)
.sort((a, b) => {
const localCompare = a.title.localeCompare(b.title)
if (localCompare !== 0) {
return localCompare
}
return b.createdTime - a.createdTime
})
this.linkShares = shares.filter(share => share.type === this.SHARE_TYPES.SHARE_TYPE_LINK || share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL)
this.shares = shares.filter(share => share.type !== this.SHARE_TYPES.SHARE_TYPE_LINK && share.type !== this.SHARE_TYPES.SHARE_TYPE_EMAIL)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
6880-6880.js.license

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
9549-9549.js.license

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save