Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prevent specified item from jumping to top on different queue type or…
… refresh
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 05f2d1e commit 6c6048c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/routes/mod-queue.tsx
Expand Up @@ -124,6 +124,7 @@ export default function () {
queue_type: string,
before: number,
show_closed = false,
jump_item_to_top = false,
): Promise<void> {
const queueReq = await fetch(
`/api/mod-queue/list?before=${before}&showClosed=${show_closed}&type=${queue_type}`,
Expand Down Expand Up @@ -153,7 +154,8 @@ export default function () {
if (
itemId &&
itemType &&
["appeal", "gma", "inactivity", "report"].includes(itemType)
["appeal", "gma", "inactivity", "report"].includes(itemType) &&
jump_item_to_top
) {
const specifiedItem = entryData.find((e) => e.id === itemId);

Expand Down Expand Up @@ -242,7 +244,7 @@ export default function () {

useEffect(() => {
(async function () {
await updateQueue(pageProps.entry_types[0].value, before);
await updateQueue(pageProps.entry_types[0].value, before, false, true);
})();

const searchParams = new URLSearchParams(location.search);
Expand Down

0 comments on commit 6c6048c

Please sign in to comment.