File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
assets/javascripts/discourse/components Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,10 @@ export default class ActivityPubPostActions extends Component {
176176 return this .status === " scheduled" ? " unschedule" : " schedule" ;
177177 }
178178
179+ get scheduleActionFunction () {
180+ return this .status === " scheduled" ? this .unschedule : this .schedule ;
181+ }
182+
179183 get scheduleLabel () {
180184 return i18n (
181185 ` post.discourse_activity_pub.actions.${ this .scheduleAction } .label` ,
@@ -298,7 +302,7 @@ export default class ActivityPubPostActions extends Component {
298302 <div class =" action-button" >
299303 <DButton
300304 @ translatedLabel ={{this .scheduleLabel }}
301- @ action ={{action this . scheduleAction }}
305+ @ action ={{this .scheduleActionFunction }}
302306 @ disabled ={{this .noFollowers }}
303307 class ={{this .scheduleAction }}
304308 />
You can’t perform that action at this time.
0 commit comments