GeezerVison is showing github.com — fix(mobile): thread context menu offers Mark unread (#37426) · pingdotgg/t3code@6234afb
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/components/ui/AppSymbol.android.tsx +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -91,6 +91,7 @@ import IconListNumbers from "@tabler/icons-react-native/IconListNumbers"; | 91 | 91 | import IconMenu2 from "@tabler/icons-react-native/IconMenu2"; | 92 | 92 | import IconMessageCircleQuestion from "@tabler/icons-react-native/IconMessageCircleQuestion"; | 93 | 93 | import IconMessage from "@tabler/icons-react-native/IconMessage"; | | 94 | +import IconMail from "@tabler/icons-react-native/IconMail"; | 94 | 95 | import IconMessageDots from "@tabler/icons-react-native/IconMessageDots"; | 95 | 96 | import IconMessagePlus from "@tabler/icons-react-native/IconMessagePlus"; | 96 | 97 | import IconMinus from "@tabler/icons-react-native/IconMinus"; | @@ -208,6 +209,7 @@ const ANDROID_ICON_BY_SF_SYMBOL = { | 208 | 209 | ellipsis: IconDots, | 209 | 210 | moon: IconMoon, | 210 | 211 | "ellipsis.circle": IconDotsCircleHorizontal, | | 212 | + "envelope.badge": IconMail, | 211 | 213 | "exclamationmark.triangle": IconAlertTriangle, | 212 | 214 | "exclamationmark.circle": IconAlertCircle, | 213 | 215 | eye: IconEye, | |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/thread-list-v2-items.tsx +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -799,6 +799,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { | 799 | 799 | }); | 800 | 800 |
| 801 | 801 | const visitThread = useAtomCommand(threadEnvironment.visit, { reportFailure: false }); | | 802 | + const markThreadUnread = useAtomCommand(threadEnvironment.markUnread, { reportFailure: false }); | 802 | 803 | const handleAcknowledgeWoke = useCallback(() => { | 803 | 804 | if (props.wokeAt === null) return; | 804 | 805 | void visitThread({ | @@ -945,6 +946,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { | 945 | 946 | supported: props.titleRegenerationSupported, | 946 | 947 | isRegenerating: isRegeneratingTitle, | 947 | 948 | }), | | 949 | + { id: "mark-unread", title: "Mark unread", image: "envelope.badge" }, | 948 | 950 | ...(canTurnIntoProject | 949 | 951 | ? [ | 950 | 952 | { | @@ -1059,6 +1061,12 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { | 1059 | 1061 | if (nativeEvent.event === "rename") handleRename(); | 1060 | 1062 | if (nativeEvent.event === "regenerate-title") handleRegenerateTitle(); | 1061 | 1063 | if (nativeEvent.event === "turn-into-project") void turnThreadIntoProject(thread); | | 1064 | + if (nativeEvent.event === "mark-unread") { | | 1065 | + void markThreadUnread({ | | 1066 | + environmentId: thread.environmentId, | | 1067 | + input: { threadId: thread.id }, | | 1068 | + }); | | 1069 | + } | 1062 | 1070 | if (nativeEvent.event === "copy-thread") { | 1063 | 1071 | const target = threadChipCopyTarget( | 1064 | 1072 | { environmentId: thread.environmentId, threadId: thread.id }, | @@ -1107,6 +1115,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { | 1107 | 1115 | handleUnpin, | 1108 | 1116 | handleUnsettle, | 1109 | 1117 | handleUnsnooze, | | 1118 | + markThreadUnread, | 1110 | 1119 | setCustomSnoozeOpen, | 1111 | 1120 | snoozePresets, | 1112 | 1121 | props.snoozePresets, | |
|