HomePhabricator
Diffusion Comm a37290eb224f

[native] Block editing messages on search and pinned messages screens, and of…

Description

[native] Block editing messages on search and pinned messages screens, and of the first message in a thread

Summary:
issues: https://linear.app/comm/issue/ENG-4834/editing-sidebar-source-message-behaves-weirdly#comment-e38584c8
https://linear.app/comm/issue/ENG-4847/not-possible-to-pin-the-source-messge#comment-9971bb16
This is a bit of a hacky solution to prevent editing in search, pinned messages and of the first message in a thread. The first two cases will be resolved by https://linear.app/comm/issue/ENG-3172/implement-navigating-to-the-message-picked-from-the-search-screen, where we will implement navigating to a message. So that hack will be reverted. The third one looks like a bug, and we will probably want to investigate it at some point, and fix it.

On web everything works correctly, so I left it for now

Test Plan: checked that "edit" is not present in tooltip in search results, pinned messages screen and for the first message in a thread. Checked that it is present for a message in parent thread from which the thread was created, as well as other messages in the thread and parent chat.

Reviewers: rohan, ginsu, atul, tomek

Reviewed By: rohan, atul, tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D9095