chore: revert labs changes
This commit is contained in:
@@ -30,11 +30,11 @@ const LabsPane: FunctionComponent<Props> = ({ application }) => {
|
|||||||
const [experimentalFeatures, setExperimentalFeatures] = useState<ExperimentalFeatureItem[]>([])
|
const [experimentalFeatures, setExperimentalFeatures] = useState<ExperimentalFeatureItem[]>([])
|
||||||
|
|
||||||
const [isPaneGesturesEnabled, setIsPaneGesturesEnabled] = useState(() =>
|
const [isPaneGesturesEnabled, setIsPaneGesturesEnabled] = useState(() =>
|
||||||
application.getPreference(PrefKey.PaneGesturesEnabled),
|
application.getPreference(PrefKey.PaneGesturesEnabled, false),
|
||||||
)
|
)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
|
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
|
||||||
setIsPaneGesturesEnabled(application.getPreference(PrefKey.PaneGesturesEnabled))
|
setIsPaneGesturesEnabled(application.getPreference(PrefKey.PaneGesturesEnabled, false))
|
||||||
})
|
})
|
||||||
}, [application])
|
}, [application])
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ const LabsPane: FunctionComponent<Props> = ({ application }) => {
|
|||||||
<LabsFeature
|
<LabsFeature
|
||||||
name="Pane switch gestures"
|
name="Pane switch gestures"
|
||||||
description="Allows using gestures to navigate"
|
description="Allows using gestures to navigate"
|
||||||
isEnabled={!!isPaneGesturesEnabled}
|
isEnabled={isPaneGesturesEnabled}
|
||||||
toggleFeature={() => {
|
toggleFeature={() => {
|
||||||
void application.setPreference(PrefKey.PaneGesturesEnabled, !isPaneGesturesEnabled)
|
void application.setPreference(PrefKey.PaneGesturesEnabled, !isPaneGesturesEnabled)
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user