namespace Friendica\Module;
use Friendica\BaseModule;
+use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Core\Session;
DI::baseUrl()->redirect($returnPath . $rand);
}
+
+ System::jsonExit(['status' => 'OK']);
}
}
in_progress = true;
- if ($(document).scrollTop() == 0) {
- force_update = true;
- }
+ let force = force_update || $(document).scrollTop() === 0;
var orgHeight = $("section").height();
var udargs = ((netargs.length) ? '/' + netargs : '');
- var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&force=' + ((force_update) ? 1 : 0) + '&item=' + update_item;
+ var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&force=' + (force ? 1 : 0) + '&item=' + update_item;
+
+ if (force_update) {
+ force_update = false;
+ }
if (getUrlParameter('page')) {
update_url += '&page=' + getUrlParameter('page');
update_url += '&max_id=' + getUrlParameter('max_id');
}
- $.get(update_url,function(data) {
+ $.get(update_url, function(data) {
in_progress = false;
- force_update = false;
update_item = 0;
$('.wall-item-body', data).imagesLoaded(function() {