From 9ebf923964491a8cd501ef2109fabee029f6c7b9 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 27 Nov 2019 12:47:18 +0100 Subject: [PATCH] MOBILE-3230 forum: Update parentheses formatting --- src/addon/mod/forum/components/post/post.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/addon/mod/forum/components/post/post.ts b/src/addon/mod/forum/components/post/post.ts index 16aedbeb5..8900dc980 100644 --- a/src/addon/mod/forum/components/post/post.ts +++ b/src/addon/mod/forum/components/post/post.ts @@ -90,17 +90,11 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy { this.uniqueId = this.post.id ? 'reply' + this.post.id : 'edit' + this.post.parent; const reTranslated = this.translate.instant('addon.mod_forum.re'); - this.displaySubject = !this.parentSubject || ( - this.post.subject != this.parentSubject && - this.post.subject != `Re: ${this.parentSubject}` && - this.post.subject != `${reTranslated} ${this.parentSubject}` - ); - this.defaultReplySubject = ( - this.post.subject.startsWith('Re: ') || - this.post.subject.startsWith(reTranslated) - ) - ? this.post.subject - : `${reTranslated} ${this.post.subject}`; + this.displaySubject = !this.parentSubject || + (this.post.subject != this.parentSubject && this.post.subject != `Re: ${this.parentSubject}` && + this.post.subject != `${reTranslated} ${this.parentSubject}`); + this.defaultReplySubject = (this.post.subject.startsWith('Re: ') || this.post.subject.startsWith(reTranslated)) + ? this.post.subject : `${reTranslated} ${this.post.subject}`; this.optionsMenuEnabled = !this.post.id || (this.forumProvider.isGetDiscussionPostAvailable() && (this.forumProvider.isDeletePostAvailable() || this.forumProvider.isUpdatePostAvailable()));