mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: showFlags
was not triggered correctly by the keyboard shortcut
This commit is contained in:
parent
9427e0c732
commit
2950a82a7d
1 changed files with 7 additions and 1 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue