feat: Swipe gestures on mobile have been improved, and are now enabled by default. You can turn them off from Preferences > General > Labs (#2321)
This commit is contained in:
@@ -69,6 +69,7 @@ type State = {
|
||||
syncTakingTooLong: boolean
|
||||
monospaceFont?: boolean
|
||||
plainEditorFocused?: boolean
|
||||
paneGestureEnabled?: boolean
|
||||
|
||||
updateSavingIndicator?: boolean
|
||||
editorFeatureIdentifier?: string
|
||||
@@ -676,6 +677,11 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
PrefDefaults[PrefKey.UpdateSavingStatusIndicator],
|
||||
)
|
||||
|
||||
const paneGestureEnabled = this.application.getPreference(
|
||||
PrefKey.PaneGesturesEnabled,
|
||||
PrefDefaults[PrefKey.PaneGesturesEnabled],
|
||||
)
|
||||
|
||||
await this.reloadSpellcheck()
|
||||
|
||||
this.reloadLineWidth()
|
||||
@@ -683,6 +689,7 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
this.setState({
|
||||
monospaceFont,
|
||||
updateSavingIndicator,
|
||||
paneGestureEnabled,
|
||||
})
|
||||
|
||||
reloadFont(monospaceFont)
|
||||
@@ -893,7 +900,8 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
ref={this.editorContentRef}
|
||||
>
|
||||
{editorMode === 'component' && this.state.editorComponentViewer && (
|
||||
<div className="component-view flex-grow">
|
||||
<div className="component-view relative flex-grow">
|
||||
{this.state.paneGestureEnabled && <div className="absolute top-0 left-0 h-full w-[20px] md:hidden" />}
|
||||
<ComponentView
|
||||
key={this.state.editorComponentViewer.identifier}
|
||||
componentViewer={this.state.editorComponentViewer}
|
||||
|
||||
Reference in New Issue
Block a user