1
0
mirror of synced 2026-08-05 15:26:55 +00:00

FEATURE: Show gists everywhere except suggested/related (#995)

This commit is contained in:
Roman Rizzi
2024-12-12 12:29:35 -03:00
committed by GitHub
parent 04c4ff8cf0
commit 97ec2c5ff4
2 changed files with 9 additions and 12 deletions
@@ -7,15 +7,9 @@ export default class Gists extends Service {
@tracked preference = localStorage.getItem("topicListLayout");
get shouldShow() {
const currentRoute = this.router.currentRoute.name;
const isDiscovery = currentRoute.includes("discovery");
const isNotCategories = !currentRoute.includes("categories");
const gistsAvailable =
this.router.currentRoute.attributes?.list?.topics?.some(
(topic) => topic.ai_topic_gist
);
return isDiscovery && isNotCategories && gistsAvailable;
return this.router.currentRoute.attributes?.list?.topics?.some(
(topic) => topic.ai_topic_gist
);
}
setPreference(value) {