Fix reset of reader store
After the slice states got reset, the base reset function just reverted all those resets and only reset the base states in the store (manga, scrollbar, ...)
This commit is contained in:
@@ -11,7 +11,7 @@ import { TReaderTapZoneContext } from '@/features/reader/tap-zones/TapZoneLayout
|
||||
|
||||
export interface ReaderTapZoneStoreSlice {
|
||||
tapZone: TReaderTapZoneContext & {
|
||||
reset: () => void;
|
||||
reset: () => ReaderTapZoneStoreSlice;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -28,6 +28,6 @@ export const createReaderTapZoneStoreSlice = <T extends ReaderTapZoneStoreSlice>
|
||||
set((draft) => {
|
||||
draft.tapZone.showPreview = showPreview;
|
||||
}),
|
||||
reset: () => set(() => ({ tapZone: { ...get().tapZone, ...DEFAULT_STATE } })),
|
||||
reset: () => ({ tapZone: { ...get().tapZone, ...DEFAULT_STATE } }),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user