mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Fix inaccurate sorting when sorting by progress
This commit is contained in:
parent
e902e1dff0
commit
5d62a87720
@ -93,8 +93,8 @@ $(() => {
|
||||
else if (by === 'date')
|
||||
res = $(a).attr('data-mtime') > $(b).attr('data-mtime');
|
||||
else if (by === 'progress') {
|
||||
const ap = $(a).attr('data-progress');
|
||||
const bp = $(b).attr('data-progress');
|
||||
const ap = parseFloat($(a).attr('data-progress'));
|
||||
const bp = parseFloat($(b).attr('data-progress'));
|
||||
if (ap === bp)
|
||||
// if progress is the same, we compare by name
|
||||
res = $(a).find('.uk-card-title').text() > $(b).find('.uk-card-title').text();
|
||||
|
Loading…
x
Reference in New Issue
Block a user