Source genre sorts design (#147)

design thing to copy tachiyomi 1 to 1
(only a slight functional change nothing screenshot-able)
(clicking a new sort always sets to ascending)
This commit is contained in:
robo
2022-03-04 11:11:17 +00:00
committed by GitHub
parent 964186ce42
commit 9c512b2a95

View File

@@ -48,8 +48,12 @@ export default function SortFilter(props: Props) {
const handleChange = (event:
React.MouseEvent<HTMLDivElement, MouseEvent>, index: number) => {
const tmp = val;
if (tmp.index === index) {
tmp.ascending = !tmp.ascending;
} else {
tmp.ascending = true;
}
tmp.index = index;
tmp.ascending = !tmp.ascending;
setval(tmp);
updateFilterValue({ position, state: JSON.stringify(tmp), group });
};