update sorting to put downloads in progress first
This commit is contained in:
parent
bd307d8108
commit
87d3e3f389
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ class DownloadsPage extends React.PureComponent {
|
||||||
data={fileInfos.sort((a, b) => {
|
data={fileInfos.sort((a, b) => {
|
||||||
// TODO: Implement sort based on user selection
|
// TODO: Implement sort based on user selection
|
||||||
if (!a.completed && b.completed) return -1;
|
if (!a.completed && b.completed) return -1;
|
||||||
|
if (a.completed && !b.completed) return 1;
|
||||||
if (a.metadata.title === b.metadata.title) return 0;
|
if (a.metadata.title === b.metadata.title) return 0;
|
||||||
return (a.metadata.title < b.metadata.title) ? -1 : 1;
|
return (a.metadata.title < b.metadata.title) ? -1 : 1;
|
||||||
})}
|
})}
|
||||||
|
|
Loading…
Reference in a new issue