0 likes in latest section

Im an employee at Jupiter.community (Jupiter Community - Interact, share, co-create). In the latest section, if a post has 0 likes, there is an empty blank. How do I make it so that it shows a physical number 0 with the like icon? [eg: Look at “Cost of living in Pune” post in screenshot, I want it to show 0 likes]

Did you using any theme component to add the like column? I think it because the Javascript from the theme component eval the like cout 0 to false.

Yes, I used this theme component - https://github.com/discourse/discourse-like-column

It seems Discourse only show Likes greater than 0 by design, you need to reopen the the topic-list-item component class then replace the hasLikes function that eval to true when likes count is 0.

https://github.com/discourse/discourse/blob/d10b6dc498c2537a3de273e0fa213df4a9a12f0b/app/assets/javascripts/discourse/app/components/topic-list-item.js#L154-L156

https://github.com/discourse/discourse/blob/d10b6dc498c2537a3de273e0fa213df4a9a12f0b/app/assets/javascripts/discourse/app/templates/list/topic-list-item.hbr#L55-L59

1 Like

I don’t have a component called topic-list-item installed

Yes, it build in the Discourse core. You may need to know more about it

I couldn’t find out much about changing Discourse core components in this link, where else can I understand this better?

You miss the modifyClass() function.