From 2950a82a7d8e545e6914dd3dec063b16e4b72409 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 4 May 2016 12:03:20 -0400 Subject: [PATCH] FIX: `showFlags` was not triggered correctly by the keyboard shortcut --- .../javascripts/discourse/lib/keyboard-shortcuts.js.es6 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index 63aa464d1..ef505ebe8 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -203,7 +203,13 @@ export default { const post = topicController.get('model.postStream.posts').findBy('id', selectedPostId); if (post) { // TODO: Use ember closure actions - const result = topicController._actions[action].call(topicController, post); + let actionMethod = topicController._actions[action]; + if (!actionMethod) { + const topicRoute = container.lookup('route:topic'); + actionMethod = topicRoute._actions[action]; + } + + const result = actionMethod.call(topicController, post); if (result && result.then) { this.appEvents.trigger('post-stream:refresh', { id: selectedPostId }); }