# Impossible d'épingler/désépingler un sujet par son titre

**URL:** <https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444>\
**Category:** Bug\
**Created:** [Décembre 30, 2021, 11:50 UTC](https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444 "2021-12-30T11:50:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)\
**Post date:** [Janvier 3, 2022, 1:02 UTC](https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444/6 "2022-01-03T13:02:34Z")

</div>

> <https://github.com/discourse/discourse/commit/61bb0df3f638963e331af4c4722216695ad6b295>
>
> Meta topic: https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213…444?u=osama.
> 
> I know there is an inconsistency between the category of the linked topic (#bug) and the title prefix of this PR, but I really couldn't find anything in the code base that suggested this ever worked before, so I'm categorizing this PR as a feature.

J’ai préfixé le commit avec `FEATURE` car je n’ai rien trouvé dans la base de code qui suggérait que cela fonctionnait auparavant, donc la seule façon de « corriger » cela était d’ajouter la prise en charge, ce qui signifie que c’est une nouvelle fonctionnalité 😃

J’ai également remarqué que le fait de basculer l’épingle depuis les listes de sujets ne fonctionnait pas ici sur Meta en raison d’un composant de thème, je l’ai donc également corrigé :

> <https://github.com/discourse/discourse-topic-thumbnails/pull/13>
>
> This component overrides core's method \`renderTopicListItem\` which has an \`@obse…rves\` decorator for \`topic.pinned\` so that the UI updates when the user toggles the pin for a topic in a topics list. However, the method override in this component doesn't apply the same decorator to the override which effectively removes the decorator entirely and that causes the UI not to update when the pin is toggled.
> 
> https://github.com/discourse/discourse/blob/810e040f170813fdff9727bf6e145824ad6f14eb/app/assets/javascripts/discourse/app/components/topic-list-item.js#L49-L53
> 
> Related meta topic: https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444?u=osama.

---

_[View the full topic](https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444)._
