fix(ui): fix duplicate is_intermediate query param when fetching images

This commit is contained in:
psychedelicious 2023-06-24 11:47:28 +10:00
parent a6c615a98c
commit 0472b33164
4 changed files with 8 additions and 3 deletions

View File

@ -54,7 +54,9 @@ export const addBoardIdSelectedListener = () => {
filteredImages.length < board.image_count &&
filteredImages.length < IMAGES_PER_PAGE
) {
dispatch(receivedPageOfImages({ categories, board_id }));
dispatch(
receivedPageOfImages({ categories, board_id, is_intermediate: false })
);
}
},
});
@ -97,7 +99,9 @@ export const addBoardIdSelected_changeSelectedImage_listener = () => {
filteredImages.length < board.image_count &&
filteredImages.length < IMAGES_PER_PAGE
) {
dispatch(receivedPageOfImages({ categories, board_id }));
dispatch(
receivedPageOfImages({ categories, board_id, is_intermediate: false })
);
}
},
});

View File

@ -20,6 +20,7 @@ export const addImageCategoriesChangedListener = () => {
receivedPageOfImages({
categories: action.payload,
board_id: state.boards.selectedBoardId,
is_intermediate: false,
})
);
}

View File

@ -168,6 +168,7 @@ const ImageGalleryContent = () => {
receivedPageOfImages({
categories,
board_id: selectedBoardId,
is_intermediate: false,
})
);
}, [categories, dispatch, selectedBoardId]);

View File

@ -256,7 +256,6 @@ export const imageUpdated = createAppAsyncThunk<
export const IMAGES_PER_PAGE = 20;
const DEFAULT_IMAGES_LISTED_ARG = {
isIntermediate: false,
limit: IMAGES_PER_PAGE,
};