diff --git a/assets/less/classes/forum/topic.less b/assets/less/classes/forum/topic.less index 78889872..afc26a16 100644 --- a/assets/less/classes/forum/topic.less +++ b/assets/less/classes/forum/topic.less @@ -71,11 +71,23 @@ display: flex; justify-content: center; align-items: center; - padding-bottom: 1px; // fixes centering + padding: 1px 1px 0 2px; &--unread { background-color: var(--accent-colour); } + + &__participated { + position: absolute; + bottom: 2px; + right: 2px; + width: 4px; + height: 4px; + background-color: #fff; + border-radius: 100%; + box-shadow: 0 1px 2px #111; + pointer-events: initial; + } } &__details { diff --git a/src/Forum/topic.php b/src/Forum/topic.php index 93efa105..3528e788 100644 --- a/src/Forum/topic.php +++ b/src/Forum/topic.php @@ -184,7 +184,14 @@ function forum_topic_listing(int $forumId, int $userId, int $offset = 0, int $ta AND tt.`user_id` = `target_user_id` AND `track_last_read` >= `topic_bumped` ) - ) AS `topic_unread` + ) AS `topic_unread`, + ( + SELECT COUNT(`post_id`) > 0 + FROM `msz_forum_posts` + WHERE `topic_id` = t.`topic_id` + AND `user_id` = `target_user_id` + LIMIT 1 + ) AS `topic_participated` FROM `msz_forum_topics` AS t LEFT JOIN `msz_users` AS au ON t.`user_id` = au.`user_id` diff --git a/templates/forum/macros.twig b/templates/forum/macros.twig index 5e16c44f..739147e1 100644 --- a/templates/forum/macros.twig +++ b/templates/forum/macros.twig @@ -130,7 +130,7 @@