chore: revert labs changes

This commit is contained in:
Aman Harwara
2023-04-26 19:05:52 +05:30
parent 51b2d8b115
commit ccac1494c2

View File

@@ -30,11 +30,11 @@ const LabsPane: FunctionComponent<Props> = ({ application }) => {
const [experimentalFeatures, setExperimentalFeatures] = useState<ExperimentalFeatureItem[]>([])
const [isPaneGesturesEnabled, setIsPaneGesturesEnabled] = useState(() =>
application.getPreference(PrefKey.PaneGesturesEnabled),
application.getPreference(PrefKey.PaneGesturesEnabled, false),
)
useEffect(() => {
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
setIsPaneGesturesEnabled(application.getPreference(PrefKey.PaneGesturesEnabled))
setIsPaneGesturesEnabled(application.getPreference(PrefKey.PaneGesturesEnabled, false))
})
}, [application])
@@ -69,7 +69,7 @@ const LabsPane: FunctionComponent<Props> = ({ application }) => {
<LabsFeature
name="Pane switch gestures"
description="Allows using gestures to navigate"
isEnabled={!!isPaneGesturesEnabled}
isEnabled={isPaneGesturesEnabled}
toggleFeature={() => {
void application.setPreference(PrefKey.PaneGesturesEnabled, !isPaneGesturesEnabled)
}}