Browse Source

Merge pull request #378 from erqan/patch-1

use peekpost in "requestRepliedBefore"
readme-update
miguelfreitas 7 years ago committed by GitHub
parent
commit
cd2cbe6d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      js/twister_actions.js

8
js/twister_actions.js

@ -26,7 +26,7 @@ function requestRepliedBefore(postLi) @@ -26,7 +26,7 @@ function requestRepliedBefore(postLi)
if( reply_n != undefined && reply_k != undefined ) {
if (reply_n[0] !== '!') {
dhtget(reply_n, "post" + reply_k, "s",
twisterRpc("peekpost", [reply_n, parseInt(reply_k)],
function (postLi, postFromJson) {
if (postFromJson) {
postLi.find('textarea').textcomplete('destroy'); // FIXME maybe we need to reset position instead (but curently it's cheaper)
@ -37,7 +37,7 @@ function requestRepliedBefore(postLi) @@ -37,7 +37,7 @@ function requestRepliedBefore(postLi)
$.MAL.relatedPostLoaded();
requestRepliedBefore(newStreamPost);
}
}, postLi);
}, postLi, function(arg,ret) {console.log(ret)});
} else {
//replied to a promoted post... try to get it..
var params = [1, parseInt(reply_k)];
@ -85,10 +85,10 @@ function getTopPostOfConversation(postLi, post, postboard) { @@ -85,10 +85,10 @@ function getTopPostOfConversation(postLi, post, postboard) {
}
if( reply_n != undefined && reply_k != undefined ) {
dhtget( reply_n, "post" + reply_k, "s",
twisterRpc("peekpost", [reply_n, parseInt(reply_k)],
function(postLi, postFromJson) {
getTopPostOfConversation(null, postFromJson, postboard);
}, postLi);
}, postLi, function(arg,ret) {console.log(ret)});
} else {
var newStreamPost;
if (post)

Loading…
Cancel
Save