mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Move Page title / focus / counts logic to service
We had a handful of methods attached to the root `Discourse` object related to focus and notification counts. This patch pulls them out into a service called `document-title` for updating the title, and a component called `d-document` to attach and listen for browser events related to focus. It also removes some computed properties and observers in favor of plain old Javascript objects.
This commit is contained in:
@@ -10,7 +10,8 @@ moduleFor("controller:topic", "controller:topic", {
|
||||
needs: [
|
||||
"controller:composer",
|
||||
"controller:application",
|
||||
"service:app-events"
|
||||
"service:app-events",
|
||||
"service:document-title"
|
||||
],
|
||||
beforeEach() {
|
||||
this.registry.injection("controller", "appEvents", "service:app-events");
|
||||
|
||||
Reference in New Issue
Block a user