mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
fix forum/components/DiscussionPage: page title not being updated when opening a discussion
This commit is contained in:
committed by
Franz Liedke
parent
e771ec90c4
commit
61231debd3
@@ -95,14 +95,6 @@ export default class DiscussionPage extends Page {
|
||||
);
|
||||
}
|
||||
|
||||
oncreate(vnode) {
|
||||
super.oncreate(vnode);
|
||||
|
||||
if (this.discussion) {
|
||||
app.setTitle(this.discussion.title());
|
||||
}
|
||||
}
|
||||
|
||||
onupdate(vnode) {
|
||||
if (m.route.get() !== this.prevRoute) {
|
||||
this.prevRoute = m.route.get();
|
||||
@@ -167,6 +159,7 @@ export default class DiscussionPage extends Page {
|
||||
this.discussion = discussion;
|
||||
|
||||
app.history.push('discussion', discussion.title());
|
||||
app.setTitle(this.discussion.title());
|
||||
app.setTitleCount(0);
|
||||
|
||||
// When the API responds with a discussion, it will also include a number of
|
||||
|
Reference in New Issue
Block a user