Commit da0917aa authored by Juan Manuel Solaro's avatar Juan Manuel Solaro

(chore): Disable post scheduler when editing old posts

1 merge request!494WIP: epic/post-scheduler
Pipeline #81583692 running with stages
......@@ -181,6 +181,7 @@
[(enabled)]="activity.paywall"
></m-wire-threshold-input>
<m-poster-date-selector
*ngIf="checkCreated()"
[date]="getTimeCreated()"
(dateChange)="onTimeCreatedChange($event)"
(onError)="posterDateSelectorError($event)"
......
......@@ -573,4 +573,10 @@ export class Activity implements OnInit {
? this.activity.time_created
: null;
}
checkCreated() {
return this.activity.time_created > Math.floor(Date.now() / 1000)
? true
: false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment