# Potentiële manier om genegeerde gebruikers te verbergen uit de onderwerplijst?

**URL:** https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980
**Category:** Development
**Created:** [28 mei 2021 om 22:03 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980 "2021-05-28T22:03:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [28 mei 2021 om 22:03 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/1 "2021-05-28T22:03:04Z")

</div>

Is that possible to make an API call to get ther user’s ignored users list and hide the topic which has that user-id or remove thoes topics before the topic list was rendered?

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [29 mei 2021 om 22:11 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/2 "2021-05-29T22:11:48Z")

</div>

Here is my implenetment for now  
[https://github.com/notedboi/Discourse-Hide-Ignored-Users](https://github.com/notedboi/Discourse-Hide-Ignored-Users)  
Inspired by  
[https://meta.discourse.org/t/topics-created-by-ignored-users-showing-on-homepage/170366/14](https://meta.discourse.org/t/topics-created-by-ignored-users-showing-on-homepage/170366/14)  
And with this theme component

> [@Topic Author](https://meta.discourse.org/t/discourse-topic-author/111021):
>
> warning Deprecated in favour of [Topic List Author](https://meta.discourse.org/t/topic-list-author/269910)discourse2Summary Topic Author will change the layout of the /latest and categories and latest topic homepage showing in the first column the author of the topic. It works both on desktop and mobile.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-author)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-topic-author](https://github.com/discourse/discourse-topic-author)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Theme…](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966)

It will also work on mobile.

In additional, if you update this line

> <https://github.com/discourse/discourse-topic-author/blob/main/mobile/head_tag.html#L5>

to

```plaintext
<a href="{{topic.lastPostUrl}}" data-user-card="{{topic.last_poster_username}}" data-user-id="{{topic.creator.username}}">{{avatar topic.lastPosterUser imageSize="large"}}</a>

```

and change my code on  
[https://github.com/notedboi/Discourse-Hide-Ignored-Users/blob/main/common/head\_tag.html#L13](https://github.com/notedboi/Discourse-Hide-Ignored-Users/blob/main/common/head_tag.html#L13)  
to

```plaintext
  let tr = $('*[data-user-id="' + ignored[u] + '"]');

```

You will be able to keep the last poster’s avatar/card view while remove topic by creator.

My only concern is the script keep checking every 500ms and might take too much memory

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [30 mei 2021 om 04:03 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/3 "2021-05-30T04:03:30Z")

</div>

I’m also looking at how to remove the ignored users from mobile category topic.

```plaintext
<script type="text/x-handlebars" data-template-name="components/mobile-category-topic">
<td class="main-link" data-user-id="{{topic.creator.username}}">
  <div class="topic-inset" >
    {{raw "topic-status" topic=topic}}
    {{topic-link topic}}
    {{#if topic.unseen}}
      <span class="badge-notification new-topic"></span>
    {{/if}}
    <span class={{cold-age-class topic.last_posted_at}} title={{raw-date topic.last_posted_at}}>{{format-age topic.last_posted_at}}</span>
  </div>
</td>
<td class="num posts">{{raw "list/post-count-or-badges" topic=topic postBadgesEnabled="true"}}</td>
</script>

```

And when I tried to add data-user-id to this view, it doesn’t work, am i looking in to a wrong template?

* * *

update: I see the issue, the topic object passed from category.topic doesn’t contain topic creator’s id, also none of the properties in the topic object can be used as flag to remove topic, I’m blocked. Any help will be appreciated :rofl:!

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [23 juni 2021 om 06:43 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/4 "2021-06-23T06:43:38Z")

</div>

Im trying to update it and avoid using setinterval, but in case if anyone would like to use it, the last update supports both **[Topic Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails-theme-component/150602)** and **[Topic List Excerpts](https://meta.discourse.org/t/topic-list-excerpts-theme-component/151520)**

---

<div class="post-metadata">

### Author: ![sok777](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sok777](https://meta.discourse.org/u/sok777)
#### Post date: [28 februari 2023 om 12:09 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/5 "2023-02-28T12:09:05Z")

</div>

Your code did not seem to work and made the forum super slow. Any thoughts? @th21

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [28 februari 2023 om 17:02 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/6 "2023-02-28T17:02:52Z")

</div>

Maybe it’s too old to use, I made a new component if you would like to try it.

[https://github.com/notedboi/discourse-ignore-plus](https://github.com/notedboi/discourse-ignore-plus)

It’s based on

> [@Need help finding why topic list not updating after click new topic/reply alert](https://meta.discourse.org/t/need-help-finding-why-topic-list-not-updating-after-click-new-topic-reply-alert/215036):
>
> On the theme creator site I was trying to remove topics from ignored users from the topic list, here is my code api.modifyClass("component:topic-list", { @on("didReceiveAttrs") removeIgnoredUsers() { this.topics = this.topics.filter( topic =\> !ignored.includes(topic.posters[0].user.username) ); } }); It works on both mobile and desktop just as expected, but I find it also cause the topic list not to update after clicking on the new topic/reply alert. …

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [7 februari 2025 om 17:26 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/7 "2025-02-07T17:26:41Z")

</div>

I’ve been using your component for a long time and I think it should be a part of Discourse core, thanks so much for creating it. Unfortunately it’s now being flagged because it needs to be updated for the new Glimmer topic lists:

> [@](#):
>
> **[Admin Notice]** One of your themes or plugins needs updating for compatibility with upcoming Discourse core changes. (id:[_discourse.hbr-topic-list-overrides_](https://meta.discourse.org/t/343404)) Identified theme: [‘ignore plus’].

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [7 februari 2025 om 17:39 UTC](https://meta.discourse.org/t/potential-way-to-hide-ignored-users-from-topic-list/191980/8 "2025-02-07T17:39:44Z")

</div>

I will take a look
