-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DMAPP-125: Chat reaction feature #128
Conversation
In the
In the
After making the above corrections and improvements, the code seems to be in good shape. All looks good. |
In the Globals.ts file, there are some mistakes in color values where the decimals are not correctly separated from integers:
In MessageComponent.tsx:
Other than those mentioned above, the code looks good. All looks good. |
…ent in socket listener
In the Globals.ts file:
In the MessageComponent.tsx file:
Overall, the code needs some fixes and improvements. Let me tidy up the code: // In Globals.ts:
All looks good.
// In MessageComponent.tsx:
- Remove the unnecessary 'handleMessageLongPress' function.
- Fix the syntax error in the messageType ternary operation.
- Add the missing closing bracket for the 'handleReply' function.
- Add missing closing brackets at the end of the file.
// Other files have not been reviewed for feedback. |
reactionPickerId={activeReactionMessageId} | ||
handleTapOutside={() => handleTapOutside()} | ||
sendReaction={handleSendReaction} | ||
chatReactions={reactionMessages?.[(item as any).cid] || []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chatReactions={reactionMessages?.[(item as any).cid] || []} | |
chatReactions={reactionMessages?.[(item as Type).cid] || []} |
sendReaction?: (reactionPayload: any) => void; | ||
chatReactions?: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sendReaction?: (reactionPayload: any) => void; | |
chatReactions?: any; | |
sendReaction?: (reactionPayload:Type) => void; | |
chatReactions?:Type; |
|
||
const Reactions: FC<ReactionsProps> = ({chatReactions, componentType}) => { | ||
// transform to IReactions | ||
const uniqueReactions = chatReactions.reduce((acc: any, reaction: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const uniqueReactions = chatReactions.reduce((acc: any, reaction: any) => { | |
const uniqueReactions = chatReactions.reduce((acc: Type, reaction:Type) => { |
</Text> | ||
</View> | ||
) : ( | ||
Object.entries(uniqueReactions).map(([content, reactions]: any[]) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object.entries(uniqueReactions).map(([content, reactions]: any[]) => ( | |
Object.entries(uniqueReactions).map(([content, reactions]: Type[]) => ( |
@@ -78,6 +80,11 @@ const useSendMessage = ( | |||
content: message, | |||
}; | |||
|
|||
if (reactionRef !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (reactionRef !== undefined) { | |
if (reactionRef) { |
All looks good. |
All looks good. |
[Feature integration]: Add reaction support in chat and show reply button on message long press.