diff options
author | dan <dan.abramov@gmail.com> | 2024-12-10 04:40:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 04:40:40 +0000 |
commit | 46e1e5cee6f0670444da4e1c64a26d8247cf49ec (patch) | |
tree | 6b74644ea81733c11794796b712b5fe7ab077db5 /src/screens/Hashtag.tsx | |
parent | fec3352b68473f1e1d9b2c038a783b7e2c8650e6 (diff) | |
download | voidsky-46e1e5cee6f0670444da4e1c64a26d8247cf49ec.tar.zst |
Fix drawer swipe (#7007)
* Fix drawer swipe * Remove existing setDrawerSwipeDisabled management This is already pretty error-prone. And with tracking whether we're idle it's going to get more complicated. Let's pause and think. * Move setDrawerSwipeDisabled logic into Pager * Remove win/2 threshold It feels super arbitrary and breaks muscle memory. If the gesture is reliable, we shouldn't need it. * Maybe work around iOS freeze * Tweak gestures, add comments * Tune gestures
Diffstat (limited to 'src/screens/Hashtag.tsx')
-rw-r--r-- | src/screens/Hashtag.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/screens/Hashtag.tsx b/src/screens/Hashtag.tsx index a0fc3707c..a87487150 100644 --- a/src/screens/Hashtag.tsx +++ b/src/screens/Hashtag.tsx @@ -14,7 +14,7 @@ import {cleanError} from '#/lib/strings/errors' import {sanitizeHandle} from '#/lib/strings/handles' import {enforceLen} from '#/lib/strings/helpers' import {useSearchPostsQuery} from '#/state/queries/search-posts' -import {useSetDrawerSwipeDisabled, useSetMinimalShellMode} from '#/state/shell' +import {useSetMinimalShellMode} from '#/state/shell' import {Pager} from '#/view/com/pager/Pager' import {TabBar} from '#/view/com/pager/TabBar' import {Post} from '#/view/com/post/Post' @@ -63,7 +63,6 @@ export default function HashtagScreen({ const [activeTab, setActiveTab] = React.useState(0) const setMinimalShellMode = useSetMinimalShellMode() - const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled() useFocusEffect( React.useCallback(() => { @@ -74,10 +73,9 @@ export default function HashtagScreen({ const onPageSelected = React.useCallback( (index: number) => { setMinimalShellMode(false) - setDrawerSwipeDisabled(index > 0) setActiveTab(index) }, - [setDrawerSwipeDisabled, setMinimalShellMode], + [setMinimalShellMode], ) const sections = React.useMemo(() => { |