Skip to content

Mobile: Use expo-image for chat images, and add haptics and copy #1807

Closed

Description

@DoodleBears

Problem and context / 问题与背景

  • Chat attachments render with React Native Image (src/ui/chat/message-attachments.tsx): no disk cache, and recycled rows can flash the previous image.
  • DESIGN.md code rule 6 asks for haptics on send, approve or deny, and submitting a choice, but the app has no haptics package.
  • There is no way to copy a message.

All three packages ship with SDK 57: expo-image ~57.0.5, expo-haptics ~57.0.3, expo-clipboard ~57.0.2.

Research: mobile-research/chat-libraries.md in the project files, item 5.

Smallest useful scope / 最小有用范围

Included:

  • Thumbnails and the full-screen viewer load through expo-image with the device Authorization header and a recyclingKey.
  • Haptics exactly where DESIGN.md rule 6 lists them.
  • Long-press a bubble to copy its text (native menu).

Excluded:

  • Video and audio.

How to verify / 如何验收

  • On a development build: images reopen from cache offline; scrolling a long DM with images shows no stale thumbnails; haptics fire on send and approve; Copy puts the message text on the clipboard.
  • The PR says the development build must be rebuilt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions