Fix volume screen sorting
This commit is contained in:
@@ -10,13 +10,7 @@
|
|||||||
import { deleteVolume, mangaStats, volumes } from '$lib/settings';
|
import { deleteVolume, mangaStats, volumes } from '$lib/settings';
|
||||||
|
|
||||||
function sortManga(a: Volume, b: Volume) {
|
function sortManga(a: Volume, b: Volume) {
|
||||||
if (a.volumeName < b.volumeName) {
|
return a.mokuroData.title.localeCompare(b.mokuroData.title);
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (a.volumeName > b.volumeName) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$: manga = $catalog?.find((item) => item.id === $page.params.manga)?.manga.sort(sortManga);
|
$: manga = $catalog?.find((item) => item.id === $page.params.manga)?.manga.sort(sortManga);
|
||||||
|
|||||||
Reference in New Issue
Block a user