Show likes on topics lists and categories - Redditish theme

Thanks Moin i forked the theme and edited javascripts/discourse/connectors/topic-list-item/item.gjs

I hope this helps someone.

  1. I added this
get likeCount() {
  return (
    this.args.outletArgs.topic.like_count ??
    this.args.outletArgs.topic.likeCount ??
    0
  );
}

Below this

@action
share(event) {
  event.stopPropagation();

  this.modal.show(ShareTopicModal, {
    model: { topic: this.args.outletArgs.topic },
  });
}

get likeCount() {
  return (
    this.args.outletArgs.topic.like_count ??
    this.args.outletArgs.topic.likeCount ??
    0
  );
}

<template>
  1. Then i changed this
<div class="custom-topic-layout_bottom-bar">
  <span class="reply-count">
    {{icon "reply"}}
    {{@outletArgs.topic.replyCount}}
    {{i18n "replies"}}
  </span>

To this:

<div class="custom-topic-layout_bottom-bar">
  <span class="like-count">
    {{icon "heart"}}
    {{this.likeCount}}
    Likes
  </span>

  <span class="reply-count">
    {{icon "reply"}}
    {{@outletArgs.topic.replyCount}}
    {{i18n "replies"}}
  </span>```