Skip to content

Commit

Permalink
fix post menu view & cancel behaviour. fixes Memmy-App#577 and (maybe)
Browse files Browse the repository at this point in the history
  • Loading branch information
flx-sta committed Jul 11, 2023
1 parent 7eb276b commit 45d8d92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/screens/Post/components/PostOptionsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useActionSheet } from "@expo/react-native-action-sheet";
import { IconDots } from "tabler-icons-react-native";
import { Alert } from "react-native";
import { useAppDispatch } from "../../../../../store";
import { commentSortOptions } from "../../../../types/CommentSortOptions";
import { lemmyAuthToken, lemmyInstance } from "../../../../LemmyInstance";
import { showToast } from "../../../../slices/toast/toastSlice";
import { writeToLog } from "../../../../helpers/LogHelper";
Expand All @@ -20,11 +19,12 @@ function CommentSortButton({ postId }: IProps) {
const dispatch = useAppDispatch();

const onPress = () => {
const cancelButtonIndex = commentSortOptions.length;
const options = ["Report Post", "Cancel"];
const cancelButtonIndex = options.indexOf("Cancel");

showActionSheetWithOptions(
{
options: ["Report Post", "Cancel"],
options,
cancelButtonIndex,
userInterfaceStyle: theme.config.initialColorMode,
},
Expand Down

0 comments on commit 45d8d92

Please sign in to comment.