Add flag val to showDifferences in post history

no issue

- set the tracked value to showDifferences state in modal-post-history
This commit is contained in:
Ronald 2023-04-21 11:18:45 +01:00
parent 1d4a358fd5
commit 6d4bee82f0

View File

@ -22,6 +22,8 @@ function checkFinishedRendering(element, done) {
export default class ModalPostHistory extends Component {
@service notifications;
@service modals;
@service feature;
constructor() {
super(...arguments);
this.post = this.args.model.post;
@ -30,9 +32,8 @@ export default class ModalPostHistory extends Component {
}
@tracked selectedHTML = `<h1>loading...</h1>`;
@tracked diffHtml = null;
@tracked showDifferences = true;
@tracked showDifferences = this.feature.get('postDiffing'); // should default to true in future
@tracked selectedRevisionIndex = 0;
@service modals;
get selectedRevision() {
return this.revisionList[this.selectedRevisionIndex];
@ -98,6 +99,7 @@ export default class ModalPostHistory extends Component {
return strippedHtml;
}
@action
restoreRevision(index) {
const revision = this.revisionList[index];
this.modals.open(RestoreRevisionModal, {