MOBILE-3230 forum: Avoid updating reply subject if it's been modified

main
Noel De Martin 2019-11-26 16:16:13 +01:00
parent 86f0db8108
commit 256c883f57
1 changed files with 7 additions and 2 deletions

View File

@ -291,8 +291,13 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy {
} else {
// The post being replied has changed but the data will be kept.
this.replyData.replyingTo = this.post.id;
this.replyData.subject = this.defaultReplySubject;
this.originalData.subject = this.defaultReplySubject;
if (this.replyData.subject == this.originalData.subject) {
// Update subject only if it hadn't been modified
this.replyData.subject = this.defaultReplySubject;
this.originalData.subject = this.defaultReplySubject;
}
this.messageControl.setValue(this.replyData.message);
}