mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Hide the read indicator if read count is zero
This commit is contained in:
@@ -69,15 +69,14 @@ registerButton("read-count", attrs => {
|
||||
});
|
||||
|
||||
registerButton("read", attrs => {
|
||||
const disabled = attrs.readCount === 0;
|
||||
if (attrs.showReadIndicator) {
|
||||
const readBySomeone = attrs.readCount > 0;
|
||||
if (attrs.showReadIndicator && readBySomeone) {
|
||||
return {
|
||||
action: "toggleWhoRead",
|
||||
title: "post.controls.read_indicator",
|
||||
icon: "book-reader",
|
||||
before: "read-count",
|
||||
addContainer: false,
|
||||
disabled
|
||||
addContainer: false
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user