From ed9a789f9f79a4304c9fb1e7a457094e9ebe2713 Mon Sep 17 00:00:00 2001 From: Dimava Date: Mon, 13 Oct 2025 23:57:35 +0300 Subject: [PATCH] FIX: fix bookmark state broken after discourse update --- .../components/details/footer/previews-actions.gjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/javascripts/discourse/components/details/footer/previews-actions.gjs b/javascripts/discourse/components/details/footer/previews-actions.gjs index aebae14..bd467fe 100644 --- a/javascripts/discourse/components/details/footer/previews-actions.gjs +++ b/javascripts/discourse/components/details/footer/previews-actions.gjs @@ -20,7 +20,7 @@ export default class PreviewsActionsComponent extends Component { this.args.topic.topic_post_can_unlike || !this.args.topic.topic_post_liked; @tracked likeCount = this.args.topic.like_count; @tracked hasLiked = this.args.topic.topic_post_liked; - @tracked bookmarked = this.args.topic.topic_post_bookmarked; + @tracked bookmarked = this.args.topic.bookmarked; topicId = this.args.topic.id; postId = this.args.topic.topic_post_id; @@ -152,8 +152,9 @@ export default class PreviewsActionsComponent extends Component { } get bookmarkTitle() { - const suffix = this.bookmarked ? "remove" : "not_bookmarked"; - return `bookmarks.${suffix}`; + return this.bookmarked + ? "bookmarks.bookmarked_success" + : "bookmarks.not_bookmarked"; }