feat(mobile): edit text messages
This commit is contained in:
@@ -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} />}
|
||||
|
||||
Reference in New Issue
Block a user