mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 01:51:36 -04:00
fix: increase type safety of local storage settings
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
c0a65a0e09
commit
5b5dabc84e
4 changed files with 58 additions and 31 deletions
|
@ -9,6 +9,7 @@ import { isDevMode, isTestMode } from '../../../utils/test-modes'
|
|||
import { fetchAndSetUser } from '../../login-page/auth/utils'
|
||||
import { loadDarkMode } from './load-dark-mode'
|
||||
import { setUpI18n } from './setupI18n'
|
||||
import { loadFromLocalStorage } from '../../../redux/editor/methods'
|
||||
|
||||
const logger = new Logger('Application Loader')
|
||||
|
||||
|
@ -62,9 +63,18 @@ export const createSetUpTaskList = (): InitTask[] => {
|
|||
name: 'Load history state',
|
||||
task: refreshHistoryState
|
||||
},
|
||||
{
|
||||
name: 'Load preferences',
|
||||
task: loadFromLocalStorageAsync
|
||||
},
|
||||
{
|
||||
name: 'Add Delay',
|
||||
task: customDelay
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const loadFromLocalStorageAsync = (): Promise<void> => {
|
||||
loadFromLocalStorage()
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue