Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowing users to navigate only when scrolling is stopped #1743

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
StyleSheet,
TouchableWithoutFeedback,
} from "react-native"
import { Ionicons, Entypo } from "@expo/vector-icons"

Check warning on line 12 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Ionicons)

Check warning on line 12 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Entypo)

// COMPONENTS
import { Card, ListItem } from "../../../../components"
Expand Down Expand Up @@ -46,7 +46,7 @@
member: OT_Member
}

interface IcontentProps {

Check warning on line 49 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Icontent)
memberInfo: I_TeamMemberCardHook
taskEdition: I_TMCardTaskEditHook
onPressIn?: (isTaskScreen?: boolean) => void
Expand All @@ -57,9 +57,10 @@
openMenuIndex: number | null
setOpenMenuIndex: React.Dispatch<React.SetStateAction<number | null>>
currentTeam: IOrganizationTeamWithMStatus | null
canNavigate: boolean
}

export const ListItemContent: React.FC<IcontentProps> = observer(

Check warning on line 63 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Icontent)
({ memberInfo, taskEdition, onPressIn }) => {
// HOOKS
const { colors, dark } = useAppTheme()
Expand Down Expand Up @@ -152,12 +153,15 @@
taskEdition.setEditMode(false)
taskEdition.setEstimateEditMode(false)
props.setOpenMenuIndex(null)
isTaskScreen
? navigation.navigate("TaskScreen", { taskId: memberInfo?.memberTask?.id })
: navigation.navigate("Profile", {
userId: memberInfo.memberUser.id,
activeTab: "worked",
})

if (memberInfo.memberTask && props.canNavigate) {
isTaskScreen
? navigation.navigate("TaskScreen", { taskId: memberInfo.memberTask?.id })
: navigation.navigate("Profile", {
userId: memberInfo.memberUser.id,
activeTab: "worked",
})
}
}
const currentMember = props.currentTeam?.members.find(
(currentMember) => currentMember.id === props.member.id,
Expand Down Expand Up @@ -335,7 +339,7 @@
setShowUnassignedList(false)
}}
>
<Ionicons name="chevron-back" size={24} color={colors.primary} />

Check warning on line 342 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Ionicons)
</TouchableOpacity>
) : (
<TouchableOpacity
Expand All @@ -346,13 +350,13 @@
}
>
{props.openMenuIndex !== props.index ? (
<Ionicons

Check warning on line 353 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Ionicons)
name="ellipsis-vertical-outline"
size={24}
color={colors.primary}
/>
) : (
<Entypo name="cross" size={24} color={colors.primary} />

Check warning on line 359 in apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Entypo)
)}
</TouchableOpacity>
)}
Expand Down
Loading
Loading