A platform for community discussion. Free, open, simple.
FIX: Dismissing unread not dismissing correctly (#26096)
Alan Guo Xiang Tan05653e11cbd9
diff --git a/app/assets/javascripts/discourse/app/controllers/discovery/list.js b/app/assets/javascripts/discourse/app/controllers/discovery/list.jsindex 2198a22c6a4..2364ad2fc40 100644--- a/app/assets/javascripts/discourse/app/controllers/discovery/list.js+++ b/app/assets/javascripts/discourse/app/controllers/discovery/list.js@@ -201,7 +201,13 @@ export default class DiscoveryListController extends Controller {}@action- dismissRead(operationType, options) {- this.bulkSelectHelper.dismissRead(operationType, options);+ dismissRead(dismissTopics) {+ const operationType = dismissTopics ? "topics" : "posts";++ this.bulkSelectHelper.dismissRead(operationType, {+ categoryId: this.model.category?.id,+ tagName: this.model.tag?.id,+ includeSubcategories: this.model.noSubcategories,+ });}}diff --git a/spec/system/page_objects/components/topic_list_controls.rb b/spec/system/page_objects/components/topic_list_controls.rbindex e764e2a9fe9..b5daea5b614 100644--- a/spec/system/page_objects/components/topic_list_controls.rb+++ b/spec/system/page_objects/components/topic_list_controls.rb@@ -11,7 +11,7 @@ module PageObjectsI18n.t("js.filters.new.title_with_count", count: count)end- has_css?(".nav-item_new", text: text)+ has_css?(".nav-item_new", exact_text: text)enddef has_unread?(count:)@@ -22,7 +22,7 @@ module PageObjectsI18n.t("js.filters.unread.title_with_count", count: count)end- has_css?(".nav-item_unread", text: text)+ has_css?(".nav-item_unread", exact_text: text)enddef dismiss_unread(untrack: false)