Prevent specified item from jumping to top on different queue type or refresh
This commit is contained in:
parent
05f2d1e732
commit
6c6048ce62
@ -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}`,
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user