When a user interacts with the inline engagement in the modal displaying pinned messages for the thread, we need to handle two cases: 1) keep the modal in the background when the reactions list is displayed, and 2) pop the modal when the replies engagement is clicked to navigate to the thread. The first is already handled by the nature of pushModal and popModal, but we need to handle the second one.
This diff pops the modal (if a modal exists) before navigating to the thread. This will also be useful for the message search implementation since I think the designs are closely shared (not too certain about it though).
There is a follow-up task to help refactor usability for the messages search screen here: https://linear.app/comm/issue/ENG-3644/refactor-file-names-details-to-make-the-thread-pin-modal-reusable-by
Depends on D7380