DEV: uses router.currentRouteName instead of application (#7942)

DEV: uses router.currentRouteName instead of application (#7942)

Ember.js - Deprecations

diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6
index 5728401..d77a4a4 100644
--- a/app/assets/javascripts/discourse/controllers/composer.js.es6
+++ b/app/assets/javascripts/discourse/controllers/composer.js.es6
@@ -81,7 +81,7 @@ export function addPopupMenuOptionsCallback(callback) {
 
 export default Ember.Controller.extend({
   topicController: Ember.inject.controller("topic"),
-  application: Ember.inject.controller(),
+  router: Ember.inject.service(),
 
   replyAsNewTopicDraft: Ember.computed.equal(
     "model.draftKey",
@@ -730,7 +730,7 @@ export default Ember.Controller.extend({
       });
 
     if (
-      this.get("application.currentRouteName").split(".")[0] === "topic" &&
+      this.router.currentRouteName.split(".")[0] === "topic" &&
       composer.get("topic.id") === this.get("topicModel.id")
     ) {
       staged = composer.get("stagedPost");
diff --git a/app/assets/javascripts/discourse/lib/page-tracker.js.es6 b/app/assets/javascripts/discourse/lib/page-tracker.js.es6
index e6390e0..d7577ed 100644
--- a/app/assets/javascripts/discourse/lib/page-tracker.js.es6
+++ b/app/assets/javascripts/discourse/lib/page-tracker.js.es6
@@ -37,7 +37,7 @@ export function startPageTracking(router, appEvents) {
       appEvents.trigger("page:changed", {
         url,
         title,
-        currentRouteName: router.get("currentRouteName"),
+        currentRouteName: router.currentRouteName,
         replacedOnlyQueryParams
       });
     });

GitHub sha: 0c7df556