MOBILE-3039 forum: Load subject when avalaible
parent
eb01a001bc
commit
a7e391bd1e
|
@ -299,8 +299,6 @@ export class AddonModForumDiscussionPage implements OnDestroy {
|
||||||
const direction = this.sort == 'flat-newest' ? 'DESC' : 'ASC';
|
const direction = this.sort == 'flat-newest' ? 'DESC' : 'ASC';
|
||||||
this.forumProvider.sortDiscussionPosts(posts, direction);
|
this.forumProvider.sortDiscussionPosts(posts, direction);
|
||||||
}
|
}
|
||||||
this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' + this.discussion.subject;
|
|
||||||
this.replyData.subject = this.defaultSubject;
|
|
||||||
|
|
||||||
// Now try to get the forum.
|
// Now try to get the forum.
|
||||||
return this.fetchForum().then((forum) => {
|
return this.fetchForum().then((forum) => {
|
||||||
|
@ -343,6 +341,10 @@ export class AddonModForumDiscussionPage implements OnDestroy {
|
||||||
this.forum = {};
|
this.forum = {};
|
||||||
this.accessInfo = {};
|
this.accessInfo = {};
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' +
|
||||||
|
(this.discussion ? this.discussion.subject : "");
|
||||||
|
this.replyData.subject = this.defaultSubject;
|
||||||
|
|
||||||
const startingPost = this.forumProvider.extractStartingPost(posts);
|
const startingPost = this.forumProvider.extractStartingPost(posts);
|
||||||
if (startingPost) {
|
if (startingPost) {
|
||||||
// Update discussion data from first post.
|
// Update discussion data from first post.
|
||||||
|
|
Loading…
Reference in New Issue