Page MenuHomePhabricator

[native] Fix reacting to robotext when sidebar is disabled
ClosedPublic

Authored by ashoat on Oct 14 2024, 11:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 10:47 AM
Unknown Object (File)
Sat, Nov 16, 10:47 AM
Unknown Object (File)
Sat, Nov 9, 7:50 AM
Unknown Object (File)
Mon, Nov 4, 5:31 AM
Unknown Object (File)
Sat, Nov 2, 1:25 AM
Unknown Object (File)
Wed, Oct 30, 11:10 PM
Unknown Object (File)
Thu, Oct 24, 1:23 AM
Unknown Object (File)
Wed, Oct 23, 2:43 AM
Subscribers
None

Details

Summary

While working on the parent diffs, I noticed an issue where pressing on a robotext did nothing.

Turns out this is not a recent regression introduced by my changes, and is an issue that has been present since we refactored how the reaction options appear.

The issue is that we had a condition that exited if visibleEntryIDs.length === 0, but our reaction options aren't rendered via visibleEntryIDs.

This diff addresses it by adding && !canCreateReactionFromMessage to the check.

Depends on D13708

Test Plan

Confirm that on native, when I press on a robotext in a sidebar, I'm able to see options to react

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/fix
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/chat/multimedia-message.react.js
249

We don't need to use chatMessageItemEngagementTargetMessageInfo here, since we've already narrowed the type of props.item to ChatMultimediaMessageInfoItem

native/chat/text-message.react.js
181–183

I removed this check because TextMessage.visibleEntryIDs never returns an empty array

This revision is now accepted and ready to land.Oct 15 2024, 1:11 AM