Skip to content

A platform for community discussion. Free, open, simple.

UX: displays reads/likes in the same order that post menu buttons (#8140)

Joffrey JAFFEUXd0390fba3ef7
diff --git a/app/assets/javascripts/discourse/widgets/post-menu.js.es6 b/app/assets/javascripts/discourse/widgets/post-menu.js.es6
index c74ee85d10a..c44035f76cd 100644
--- a/app/assets/javascripts/discourse/widgets/post-menu.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-menu.js.es6
@@ -525,6 +525,19 @@ export default createWidget("post-menu", {
)
];
+ if (state.readers.length) {
+ const remaining = state.totalReaders - state.readers.length;
+ contents.push(
+ this.attach("small-user-list", {
+ users: state.readers,
+ addSelf: false,
+ listClassName: "who-read",
+ description: "post.actions.people.read",
+ count: remaining
+ })
+ );
+ }
+
if (state.likedUsers.length) {
const remaining = state.total - state.likedUsers.length;
contents.push(
@@ -541,19 +554,6 @@ export default createWidget("post-menu", {
);
}
- if (state.readers.length) {
- const remaining = state.totalReaders - state.readers.length;
- contents.push(
- this.attach("small-user-list", {
- users: state.readers,
- addSelf: false,
- listClassName: "who-read",
- description: "post.actions.people.read",
- count: remaining
- })
- );
- }
-
return contents;
},