Browse Source

use peekpost in "requestRepliedBefore"

readme-update
erqan 7 years ago committed by GitHub
parent
commit
3f48993f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      js/twister_actions.js

4
js/twister_actions.js

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

Loading…
Cancel
Save