mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 04:29:55 +02:00
Fix #716: constant and unpredictable reordering during file upload
This commit is contained in:
parent
99b8ef2d02
commit
a3a7ec0873
2 changed files with 9 additions and 5 deletions
|
@ -279,15 +279,18 @@ export default {
|
|||
},
|
||||
sortedFiles() {
|
||||
// return errored files on top
|
||||
return this.files.sort(f => {
|
||||
|
||||
return _.sortBy(this.files.map(f => {
|
||||
let statusIndex = 0
|
||||
if (f.errored) {
|
||||
return -5;
|
||||
statusIndex = -1
|
||||
}
|
||||
if (f.success) {
|
||||
return 5;
|
||||
statusIndex = 1
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
f.statusIndex = statusIndex
|
||||
return f
|
||||
}), ['statusIndex', 'name'])
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue