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:
@@ -48,8 +48,12 @@ export default function SortFilter(props: Props) {
|
|||||||
const handleChange = (event:
|
const handleChange = (event:
|
||||||
React.MouseEvent<HTMLDivElement, MouseEvent>, index: number) => {
|
React.MouseEvent<HTMLDivElement, MouseEvent>, index: number) => {
|
||||||
const tmp = val;
|
const tmp = val;
|
||||||
tmp.index = index;
|
if (tmp.index === index) {
|
||||||
tmp.ascending = !tmp.ascending;
|
tmp.ascending = !tmp.ascending;
|
||||||
|
} else {
|
||||||
|
tmp.ascending = true;
|
||||||
|
}
|
||||||
|
tmp.index = index;
|
||||||
setval(tmp);
|
setval(tmp);
|
||||||
updateFilterValue({ position, state: JSON.stringify(tmp), group });
|
updateFilterValue({ position, state: JSON.stringify(tmp), group });
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user