feat: prioritize loading latest selected items (#1930)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export enum PersistenceKey {
|
||||
SelectedItemsController = 'selected-items-controller',
|
||||
NavigationController = 'navigation-controller',
|
||||
}
|
||||
|
||||
export type SelectionControllerPersistableValue = {
|
||||
selectedUuids: string[]
|
||||
}
|
||||
|
||||
export type NavigationControllerPersistableValue = {
|
||||
selectedTagUuid: string
|
||||
}
|
||||
|
||||
export type PersistedStateValue = {
|
||||
[PersistenceKey.SelectedItemsController]: SelectionControllerPersistableValue
|
||||
[PersistenceKey.NavigationController]: NavigationControllerPersistableValue
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
import { PersistedStateValue } from '../StatePersistence/StatePersistence'
|
||||
|
||||
export enum StorageKey {
|
||||
AnonymousUserId = 'AnonymousUserId',
|
||||
ShowBetaWarning = 'ShowBetaWarning',
|
||||
ShowNoAccountWarning = 'ShowNoAccountWarning',
|
||||
FilesNavigationEnabled = 'FilesNavigationEnabled',
|
||||
MasterStatePersistenceKey = 'master-persistence-key',
|
||||
}
|
||||
|
||||
export type StorageValue = {
|
||||
@@ -10,6 +13,7 @@ export type StorageValue = {
|
||||
[StorageKey.ShowBetaWarning]: boolean
|
||||
[StorageKey.ShowNoAccountWarning]: boolean
|
||||
[StorageKey.FilesNavigationEnabled]: boolean
|
||||
[StorageKey.MasterStatePersistenceKey]: PersistedStateValue
|
||||
}
|
||||
|
||||
export const storage = {
|
||||
|
||||
@@ -20,3 +20,4 @@ export * from './Storage/LocalStorage'
|
||||
export * from './Theme/ThemeManager'
|
||||
export * from './Toast/ToastService'
|
||||
export * from './Toast/ToastServiceInterface'
|
||||
export * from './StatePersistence/StatePersistence'
|
||||
|
||||
Reference in New Issue
Block a user