FIX: Do not show 'new or updated topics' for mobile categories page (#14490)

This banner should only show on the 'categories + latest topics' view, which is desktop-only

https://meta.discourse.org/t/204979
This commit is contained in:
David Taylor 2021-10-01 16:52:35 +01:00 committed by GitHub
parent 4c2d5158c5
commit b6937e936b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import DiscourseURL from "discourse/lib/url";
import { NotificationLevels } from "discourse/lib/notification-levels"; import { NotificationLevels } from "discourse/lib/notification-levels";
import PreloadStore from "discourse/lib/preload-store"; import PreloadStore from "discourse/lib/preload-store";
import User from "discourse/models/user"; import User from "discourse/models/user";
import Site from "discourse/models/site";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
function isNew(topic) { function isNew(topic) {
@ -244,6 +245,7 @@ const TopicTrackingState = EmberObject.extend({
if ( if (
filter === "categories" && filter === "categories" &&
data.message_type === "latest" && data.message_type === "latest" &&
!Site.current().mobileView &&
this.siteSettings.desktop_category_page_style === this.siteSettings.desktop_category_page_style ===
"categories_and_latest_topics" "categories_and_latest_topics"
) { ) {