mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 22:27:19 +08:00
FIX: showFlags
was not triggered correctly by the keyboard shortcut
This commit is contained in:
@ -203,7 +203,13 @@ export default {
|
|||||||
const post = topicController.get('model.postStream.posts').findBy('id', selectedPostId);
|
const post = topicController.get('model.postStream.posts').findBy('id', selectedPostId);
|
||||||
if (post) {
|
if (post) {
|
||||||
// TODO: Use ember closure actions
|
// 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) {
|
if (result && result.then) {
|
||||||
this.appEvents.trigger('post-stream:refresh', { id: selectedPostId });
|
this.appEvents.trigger('post-stream:refresh', { id: selectedPostId });
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user