refactor: usePreference + update TS tooling (#2333)

This commit is contained in:
Aman Harwara
2023-05-11 20:04:14 +05:30
committed by GitHub
parent bcd962f150
commit 3b5bf1e509
188 changed files with 544 additions and 2028 deletions

View File

@@ -28,15 +28,6 @@ export enum PrefKey {
AutoLightThemeIdentifier = 'autoLightThemeIdentifier',
AutoDarkThemeIdentifier = 'autoDarkThemeIdentifier',
NoteAddToParentFolders = 'noteAddToParentFolders',
MobileSortNotesBy = 'mobileSortBy',
MobileSortNotesReverse = 'mobileSortReverse',
MobileNotesHideNotePreview = 'mobileHideNotePreview',
MobileNotesHideDate = 'mobileHideDate',
MobileNotesHideTags = 'mobileHideTags',
MobileLastExportDate = 'mobileLastExportDate',
MobileDoNotShowAgainUnsupportedEditors = 'mobileDoNotShowAgainUnsupportedEditors',
MobileSelectedTagUuid = 'mobileSelectedTagUuid',
MobileNotesHideEditorIcon = 'mobileHideEditorIcon',
NewNoteTitleFormat = 'newNoteTitleFormat',
CustomNoteTitleFormat = 'customNoteTitleFormat',
UpdateSavingStatusIndicator = 'updateSavingStatusIndicator',
@@ -102,15 +93,6 @@ export type PrefValue = {
[PrefKey.AutoLightThemeIdentifier]: FeatureIdentifier | 'Default' | 'Dark'
[PrefKey.AutoDarkThemeIdentifier]: FeatureIdentifier | 'Default' | 'Dark'
[PrefKey.NoteAddToParentFolders]: boolean
[PrefKey.MobileSortNotesBy]: CollectionSortProperty
[PrefKey.MobileSortNotesReverse]: boolean
[PrefKey.MobileNotesHideNotePreview]: boolean
[PrefKey.MobileNotesHideDate]: boolean
[PrefKey.MobileNotesHideTags]: boolean
[PrefKey.MobileLastExportDate]: Date | undefined
[PrefKey.MobileDoNotShowAgainUnsupportedEditors]: boolean
[PrefKey.MobileSelectedTagUuid]: string | undefined
[PrefKey.MobileNotesHideEditorIcon]: boolean
[PrefKey.NewNoteTitleFormat]: NewNoteTitleFormat
[PrefKey.CustomNoteTitleFormat]: string
[PrefKey.EditorLineHeight]: EditorLineHeight