mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
refactor(ui): refactor persist config
Add more structure around persist configs to avoid bugs from typos and misplaced persist denylists.
This commit is contained in:
committed by
Kent Keirsey
parent
0976ddba23
commit
c1300fa8b1
@ -1,6 +1,6 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { PersistConfig, RootState } from 'app/store/store';
|
||||
import type { ParameterHRFMethod, ParameterStrength } from 'features/parameters/types/parameterSchemas';
|
||||
|
||||
export interface HRFState {
|
||||
@ -48,3 +48,10 @@ export const migrateHRFState = (state: any): any => {
|
||||
}
|
||||
return state;
|
||||
};
|
||||
|
||||
export const hrfPersistConfig: PersistConfig<HRFState> = {
|
||||
name: hrfSlice.name,
|
||||
initialState: initialHRFState,
|
||||
migrate: migrateHRFState,
|
||||
persistDenylist: [],
|
||||
};
|
||||
|
Reference in New Issue
Block a user