Improved JS, updating single items now work

This commit is contained in:
Michael 2018-02-27 22:37:11 +00:00
parent 4070ad1815
commit 9cf342f02a
3 changed files with 40 additions and 37 deletions

View File

@ -760,10 +760,12 @@ function networkThreadedView(App $a, $update, $parent)
// Fetch a page full of parent items for this page
if ($update) {
if (!empty($parent)) {
logger('Blubb: '.$parent);
$sql_extra4 = "`item`.`id` = ".intval($parent);
} else {
$sql_extra4 = "`item`.`unseen`";
if (Config::get("system", "like_no_comment")) {
$sql_extra4 .= " AND `item`.`verb` = '".ACTIVITY_POST."'";
}
}
$r = q("SELECT `item`.`parent-uri` AS `uri`, `item`.`parent` AS `item_id`, $sql_order AS `order_date`

View File

@ -396,11 +396,11 @@ function NavUpdate() {
}
function liveUpdate(src) {
if ((src == null) || (stopped) || (! profile_uid)) {
if ((src == null) || stopped || !profile_uid) {
$('.like-rotator').hide(); return;
}
if (($('.comment-edit-text-full').length) || (in_progress)) {
if (($('.comment-edit-text-full').length) || in_progress) {
if (livetime) {
clearTimeout(livetime);
}

View File

@ -752,6 +752,7 @@ function doLikeAction(ident, verb) {
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
liking = 1;
force_update = true;
update_item = ident.toString();
}
// Decodes a hexadecimally encoded binary string