@@ -275,24 +275,23 @@ export default {
275275 * @param {object} share the share ocs api request data
276276 * @param {object} share.data the request data
277277 */
278- processShares ({ data }) {
279- if (data .ocs && data .ocs .data && data .ocs .data .length > 0 ) {
280- // create Share objects and sort by title in alphabetical order and then by creation time
281- const shares = data .ocs .data
282- .map (share => new Share (share))
283- .sort ((a , b ) => {
284- if (a .title < b .title ) return - 1
285- if (a .title > b .title ) return 1
286- return b .createdTime - a .createdTime
287- })
288-
289- this .linkShares = shares .filter (share => share .type === this .SHARE_TYPES .SHARE_TYPE_LINK || share .type === this .SHARE_TYPES .SHARE_TYPE_EMAIL )
290- this .shares = shares .filter (share => share .type !== this .SHARE_TYPES .SHARE_TYPE_LINK && share .type !== this .SHARE_TYPES .SHARE_TYPE_EMAIL )
291-
292- console .debug (' Processed' , this .linkShares .length , ' link share(s)' )
293- console .debug (' Processed' , this .shares .length , ' share(s)' )
294- }
295- },
278+ processShares ({ data }) {
279+ if (data .ocs && data .ocs .data && data .ocs .data .length > 0 ) {
280+ // create Share objects and sort by title in alphabetical order and then by creation time
281+ const shares = data .ocs .data
282+ .map (share => new Share (share))
283+ .sort ((a , b ) => {
284+ if (a .title < b .title ) return - 1
285+ if (a .title > b .title ) return 1
286+ return b .createdTime - a .createdTime
287+ })
288+ this .linkShares = shares .filter (share => share .type === this .SHARE_TYPES .SHARE_TYPE_LINK || share .type === this .SHARE_TYPES .SHARE_TYPE_EMAIL )
289+ this .shares = shares .filter (share => share .type !== this .SHARE_TYPES .SHARE_TYPE_LINK && share .type !== this .SHARE_TYPES .SHARE_TYPE_EMAIL )
290+
291+ console .debug (' Processed' , this .linkShares .length , ' link share(s)' )
292+ console .debug (' Processed' , this .shares .length , ' share(s)' )
293+ }
294+ },
296295
297296 /**
298297 * Process the sharedWithMe share data
0 commit comments