Page MenuHomePhabricator

D5961.id20229.diff
No OneTemporary

D5961.id20229.diff

diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js
--- a/native/navigation/tooltip.react.js
+++ b/native/navigation/tooltip.react.js
@@ -245,7 +245,26 @@
return entries;
}
const visibleSet = new Set(visibleEntryIDs);
- return entries.filter(entry => visibleSet.has(entry.id));
+ const filteredEntries = entries.filter(entry => visibleSet.has(entry.id));
+
+ // this is a temporary change and will be reverted once we go from
+ // message liking to message reactions
+ return filteredEntries.map(entry => {
+ if (entry.id !== 'react') {
+ return entry;
+ }
+
+ const messageLikes = this.props.route.params.item?.reactions.get('👍');
+ let reactionEntryText = entry.text;
+ if (messageLikes && messageLikes.viewerReacted) {
+ reactionEntryText = 'Unlike';
+ }
+
+ return {
+ ...entry,
+ text: reactionEntryText,
+ };
+ });
}
get tooltipHeight(): number {
@@ -635,7 +654,13 @@
};
getPlatformSpecificButtonIndices = (options: Array<string>) => {
- const destructiveButtonIndex = Platform.OS === 'ios' ? 1 : undefined;
+ let destructiveButtonIndex;
+ if (Platform.OS === 'ios') {
+ const reportIndex = options.findIndex(option => option === 'Report');
+ destructiveButtonIndex =
+ reportIndex !== -1 ? options.length - reportIndex : undefined;
+ }
+
const cancelButtonIndex = Platform.OS === 'ios' ? 0 : -1;
// The "Cancel" action is iOS-specific

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 7:34 AM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578495
Default Alt Text
D5961.id20229.diff (1 KB)

Event Timeline