Skip to content

Commit

Permalink
fix: tap to collapse disable (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkasdorf authored Aug 1, 2023
1 parent 6271887 commit 1c862cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/screens/Post/components/PostCommentItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function PostCommentItem({ commentId }: IProps) {
const comment = usePostComment(postKey, commentId);
const commentHook = useComment({ comment });

const tapToCollapse = useSettingsStore(
(state) => state.settings.tapToCollapse
);

const swipeLeftSecond = useSettingsStore(
(state) => state.settings.commentSwipeLeftSecond
);
Expand All @@ -45,6 +49,8 @@ function PostCommentItem({ commentId }: IProps) {
const onPress = useCallback(() => {
onGenericHapticFeedback();

if (!tapToCollapse) return;

setCollapsed(postKey, commentId);
}, [commentId]);

Expand Down

0 comments on commit 1c862cc

Please sign in to comment.