feat(mobile): edit text messages

This commit is contained in:
Arjun Patel
2026-05-26 10:10:49 -07:00
parent ec01ca77e4
commit e7fed5f037
4 changed files with 142 additions and 0 deletions
@@ -14,6 +14,7 @@ export type StreamActionId =
| "toggle-status"
| "rename"
| "members"
| "edit-particle"
| "delete-particle";
interface StreamActionsSheetProps {
@@ -22,6 +23,8 @@ interface StreamActionsSheetProps {
onSelect: (action: StreamActionId) => void;
streamStatus: "open" | "closed";
isCreator: boolean;
/** True when the *current* particle is a text particle this user authored. */
canEditParticle: boolean;
/** True when the *current* particle is one this user can soft-delete. */
canDeleteParticle: boolean;
}
@@ -32,6 +35,7 @@ export function StreamActionsSheet({
onSelect,
streamStatus,
isCreator,
canEditParticle,
canDeleteParticle,
}: StreamActionsSheetProps) {
// Hold the picked action until the sheet's Modal has fully unmounted, then
@@ -82,6 +86,13 @@ export function StreamActionsSheet({
onPress={() => choose("rename")}
/>
) : null}
{canEditParticle ? (
<ActionRow
icon={<Pencil color="white" size={20} />}
label="Edit particle"
onPress={() => choose("edit-particle")}
/>
) : null}
{canDeleteParticle ? (
<ActionRow
icon={<Trash2 color="#ef4444" size={20} />}