UX: Hide the read indicator if read count is zero
This commit is contained in:
parent
7a70fce584
commit
f9ee6e923a
|
@ -69,15 +69,14 @@ registerButton("read-count", attrs => {
|
||||||
});
|
});
|
||||||
|
|
||||||
registerButton("read", attrs => {
|
registerButton("read", attrs => {
|
||||||
const disabled = attrs.readCount === 0;
|
const readBySomeone = attrs.readCount > 0;
|
||||||
if (attrs.showReadIndicator) {
|
if (attrs.showReadIndicator && readBySomeone) {
|
||||||
return {
|
return {
|
||||||
action: "toggleWhoRead",
|
action: "toggleWhoRead",
|
||||||
title: "post.controls.read_indicator",
|
title: "post.controls.read_indicator",
|
||||||
icon: "book-reader",
|
icon: "book-reader",
|
||||||
before: "read-count",
|
before: "read-count",
|
||||||
addContainer: false,
|
addContainer: false
|
||||||
disabled
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue