Page MenuHomePhabricator

[native] Show a pin icon next to pinned messages
ClosedPublic

Authored by rohan on May 8 2023, 6:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 12:46 PM
Unknown Object (File)
Thu, Apr 11, 12:46 PM
Unknown Object (File)
Mar 27 2024, 11:53 PM
Unknown Object (File)
Mar 7 2024, 7:17 AM
Unknown Object (File)
Mar 2 2024, 9:05 PM
Unknown Object (File)
Feb 21 2024, 8:40 AM
Unknown Object (File)
Feb 21 2024, 6:17 AM
Unknown Object (File)
Feb 21 2024, 4:48 AM
Subscribers

Details

Summary

Next to each pinned message, we want to display a pin icon to indicate that the message is pinned. We only want to show this icon in chat, and not the pin modal / pinned messages screen.

Logic is pretty much identical to https://phab.comm.dev/D7505

Depends on D7735

Linear: https://linear.app/comm/issue/ENG-3455/show-a-pin-icon-next-to-pinned-messages

Test Plan

Test to confirm that the pin indicator appears in chat and not the other instances where Message is rendered (like the pin modal and screen).

For iOS, the confirmation is that there are no message height inconsistencies in the terminal. For Android, they appear on master, but the message height warnings don't show for all of the pinned messages so it makes me believe no changes made in this diff cause the warnings.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan requested review of this revision.May 8 2023, 7:11 AM
atul requested changes to this revision.May 8 2023, 9:24 AM
atul added inline comments.
native/chat/composed-message.react.js
167 ↗(On Diff #26201)

Can we memoize? Can probably put all of pinIcon in a useMemo?

This revision now requires changes to proceed.May 8 2023, 9:24 AM

Disregard... it's a class component. My bad.

This revision is now accepted and ready to land.May 8 2023, 9:29 AM