I want to implement a chat application, I want to show chat messages with multiple view type like

  • Media Files (Video, Audio, Photo)
  • Documents (PDF, DOC, EXCEL)
  • Likes... etc

also, implement reply of a particular message similar to Facebook chat section in android app. Please suggest me how to do this with adapter delegate pattern Here images for reference

Image File

1 Answers

0
Fabian Andrei On

You can create a 'Comments' Table:

CREATE TABLE comments (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
postid INT(6) UNSIGNED,
comment VARCHAR(30) NOT NULL,
)

I use php for my code and i don't know but you can 'take id of the post' when you are clicking the comment button, and then showing all comments with same post id.