DEV: Add class to solved topics in list (#159)

DEV: Add class to solved topics in list (#159)

diff --git a/assets/javascripts/discourse/initializers/add-topic-list-class.js.es6 b/assets/javascripts/discourse/initializers/add-topic-list-class.js.es6
new file mode 100644
index 0000000..d67e674
--- /dev/null
+++ b/assets/javascripts/discourse/initializers/add-topic-list-class.js.es6
@@ -0,0 +1,18 @@
+import discourseComputed from "discourse-common/utils/decorators";
+import TopicListItem from "discourse/components/topic-list-item";
+
+export default {
+  name: "add-topic-list-class",
+  initialize() {
+    TopicListItem.reopen({
+      @discourseComputed()
+      unboundClassNames() {
+        let classList = this._super(...arguments);
+        if (this.topic.has_accepted_answer) {
+          classList += " status-solved";
+        }
+        return classList;
+      },
+    });
+  },
+};

GitHub sha: 6b6d5978a2fd17935cf2cd287c6a492525d75bbf

This commit appears in #159 which was approved by davidtaylorhq. It was merged by awesomerobot.