RTippin / messenger-ui

Ready-made UI and web routes for core rtippin/messenger.
MIT License
14 stars 14 forks source link

Read messages #5

Closed zmiulan closed 2 years ago

zmiulan commented 2 years ago

Is there any way to display some "read mark" on messages in private thread (not like head bobbles)?

RTippin commented 2 years ago

With the current UI I have, you "could" fork this repository and edit the bobble-head methods, (drawBobbleHeads, updateBobbleHead, checkRecentBobbleHeads) located:

https://github.com/RTippin/messenger-ui/blob/74d9eaa1e5ed1ef4f2c59ddaf98787433edc2ea8/resources/js/managers/ThreadManager.js#L1135

As for my current plans, I will not be changing any design until my overhaul when I release the UI in React (no ETA yet), but I do plan to update how "seen" UI works between private or group threads in the react version.

One FYI on how the backend side works for that, individual messages are not marked read, rather, the thread's updated_at is set each time a new messages is sent. So those bobbles are based on the last_read timestamp for each participant and goes under the messages with the closest created_at timestamp that matches, and a thread is considered read when a participant's last_read is equal to or greater than the thread's updated_at.