feat: add custom note title format pref (#1678)
This commit is contained in:
@@ -41,6 +41,7 @@ import AutoresizingNoteViewTextarea from './AutoresizingTextarea'
|
||||
import MobileItemsListButton from '../NoteGroupView/MobileItemsListButton'
|
||||
import NoteTagsPanel from '../NoteTags/NoteTagsPanel'
|
||||
import NoteTagsContainer from '../NoteTags/NoteTagsContainer'
|
||||
import { PrefDefaults } from '@/Constants/PrefDefaults'
|
||||
|
||||
const MinimumStatusDuration = 400
|
||||
const TextareaDebounce = 100
|
||||
@@ -686,9 +687,15 @@ class NoteView extends PureComponent<NoteViewProps, State> {
|
||||
}
|
||||
|
||||
async reloadPreferences() {
|
||||
const monospaceFont = this.application.getPreference(PrefKey.EditorMonospaceEnabled, true)
|
||||
const monospaceFont = this.application.getPreference(
|
||||
PrefKey.EditorMonospaceEnabled,
|
||||
PrefDefaults[PrefKey.EditorMonospaceEnabled],
|
||||
)
|
||||
|
||||
const marginResizersEnabled = this.application.getPreference(PrefKey.EditorResizersEnabled, true)
|
||||
const marginResizersEnabled = this.application.getPreference(
|
||||
PrefKey.EditorResizersEnabled,
|
||||
PrefDefaults[PrefKey.EditorResizersEnabled],
|
||||
)
|
||||
|
||||
await this.reloadSpellcheck()
|
||||
|
||||
@@ -700,14 +707,14 @@ class NoteView extends PureComponent<NoteViewProps, State> {
|
||||
reloadFont(monospaceFont)
|
||||
|
||||
if (marginResizersEnabled) {
|
||||
const width = this.application.getPreference(PrefKey.EditorWidth, null)
|
||||
const width = this.application.getPreference(PrefKey.EditorWidth, PrefDefaults[PrefKey.EditorWidth])
|
||||
if (width != null) {
|
||||
this.setState({
|
||||
leftResizerWidth: width,
|
||||
rightResizerWidth: width,
|
||||
})
|
||||
}
|
||||
const left = this.application.getPreference(PrefKey.EditorLeft, null)
|
||||
const left = this.application.getPreference(PrefKey.EditorLeft, PrefDefaults[PrefKey.EditorLeft])
|
||||
if (left != null) {
|
||||
this.setState({
|
||||
leftResizerOffset: left,
|
||||
|
||||
Reference in New Issue
Block a user