Skip to content

Commit 7759a25

Browse files
committed
feat: Do not always reset to sorting by newest
...if order has been changed by the user previously.
1 parent 732c537 commit 7759a25

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/browser/context.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ const createUseBrowseState = ({ syncWithUrl }: { syncWithUrl: boolean }) => {
193193
setParams((prev) => ({
194194
...prev,
195195
search: "",
196-
order: SearchCubeResultOrder.CreatedDesc,
196+
order:
197+
previousOrderRef.current === SearchCubeResultOrder.Score
198+
? SearchCubeResultOrder.CreatedDesc
199+
: previousOrderRef.current,
197200
}));
198201
},
199202
onSubmitSearch: (newSearch: string) => {

0 commit comments

Comments
 (0)