fix(ui): when changing viewer state, always clear compare image

This commit is contained in:
psychedelicious 2024-06-01 09:44:19 +10:00
parent 8ea4067f83
commit 3cfd2755c2

View File

@ -89,10 +89,7 @@ export const gallerySlice = createSlice({
state.alwaysShowImageSizeBadge = action.payload;
},
isImageViewerOpenChanged: (state, action: PayloadAction<boolean>) => {
if (state.isImageViewerOpen && state.imageToCompare) {
state.imageToCompare = null;
return;
}
state.imageToCompare = null;
state.isImageViewerOpen = action.payload;
},
comparedImagesSwapped: (state) => {