Skip to content

A platform for community discussion. Free, open, simple.

FIX: proper jumpToPost with whispers/small-actions

Régis Hanol72e38b291f37
diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6
index fbfdc0f4864..6cb4ecf0bee 100644
--- a/app/assets/javascripts/discourse/controllers/topic.js.es6
+++ b/app/assets/javascripts/discourse/controllers/topic.js.es6
@@ -690,20 +690,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
},
jumpToPost(postNumber) {
- if (this.get("model.postStream.isMegaTopic")) {
- this._jumpToPostNumber(postNumber);
- } else {
- const postStream = this.get("model.postStream");
- let postId = postStream.findPostIdForPostNumber(postNumber);
-
- // If we couldn't find the post, find the closest post to it
- if (!postId) {
- const closest = postStream.closestPostNumberFor(postNumber);
- postId = postStream.findPostIdForPostNumber(closest);
- }
-
- this._jumpToPostId(postId);
- }
+ this._jumpToPostNumber(postNumber);
},
jumpTop() {