mirror of
https://github.com/flarum/core.git
synced 2025-08-01 22:20:21 +02:00
Change tab title after renaming discussion (#1543)
* Change tab title after renaming discussion * Uncommit dist * Uncommit package-lock.json * Fix for VDOM * Move setTitle into DiscussionPage#config
This commit is contained in:
committed by
Franz Liedke
parent
2e16b0ce2e
commit
fd36d18729
@@ -115,6 +115,12 @@ export default class DiscussionPage extends Page {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config() {
|
||||||
|
if (this.discussion) {
|
||||||
|
app.setTitle(this.discussion.title());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear and reload the discussion.
|
* Clear and reload the discussion.
|
||||||
*/
|
*/
|
||||||
@@ -160,7 +166,6 @@ export default class DiscussionPage extends Page {
|
|||||||
this.discussion = discussion;
|
this.discussion = discussion;
|
||||||
|
|
||||||
app.history.push('discussion', discussion.title());
|
app.history.push('discussion', discussion.title());
|
||||||
app.setTitle(discussion.title());
|
|
||||||
app.setTitleCount(0);
|
app.setTitleCount(0);
|
||||||
|
|
||||||
// When the API responds with a discussion, it will also include a number of
|
// When the API responds with a discussion, it will also include a number of
|
||||||
|
Reference in New Issue
Block a user