Repository navigation
Conversation
Rigth now all activities are being marked as `read` when we visit `/activities`. This patch changes it so activity is marked as `read` only when we click on it or when we use `Mark all read` button.
| .activity-body | ||
| .activity-title | ||
| = link_to(subject.topic.title, topic_path(subject.topic, anchor: message_dom_id(subject))) | ||
| = link_to subject.topic.title, read_activity_path(activity), data: { turbo_method: :post } |
There was a problem hiding this comment.
I like the idea and I was also thinking about doing something similar, but I think the implementation should be a bit different: this breaks middle-clicks. I would instead break restfullness here, and use GET
There's also a question what happens when the same topic receives multiple replies: generally I only click to one of the links, and I would expect all of them to become read with that.
There was a problem hiding this comment.
There's also a question what happens when the same topic receives multiple replies: generally I only click to one of the links, and I would expect all of them to become read with that.
Makes sense.
There was a problem hiding this comment.
Sorry for the late reply, looks good but it also needs a data: { turbo_prefetch: false } disabling so that it doesn't mark activities as read on hover
Rigth now all activities are being marked as
readwhen we visit/activities. This patch changes it so activity is marked asreadonly when we click on it or when we useMark all readbutton.#131