From 9c512b2a95826e2178c7b830218d4c11bc492174 Mon Sep 17 00:00:00 2001 From: robo <30987265+Robonau@users.noreply.github.com> Date: Fri, 4 Mar 2022 11:11:17 +0000 Subject: [PATCH] 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) --- src/components/source/filters/SortFilter.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/source/filters/SortFilter.tsx b/src/components/source/filters/SortFilter.tsx index fd03d388..4c26a467 100644 --- a/src/components/source/filters/SortFilter.tsx +++ b/src/components/source/filters/SortFilter.tsx @@ -48,8 +48,12 @@ export default function SortFilter(props: Props) { const handleChange = (event: React.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 }); };