From: Michael Vogel Date: Fri, 1 Aug 2014 17:59:06 +0000 (+0200) Subject: Auto update of network page only at top of the page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2f89a9b3e8c8028ef9dd0bdc8cd8611e5d67903d;p=friendica.git Auto update of network page only at top of the page --- diff --git a/js/main.js b/js/main.js index a4a1c977ca..902c19a839 100644 --- a/js/main.js +++ b/js/main.js @@ -302,7 +302,7 @@ in_progress = true; var udargs = ((netargs.length) ? '/' + netargs : ''); - var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0) + '&top=' + ($(document).scrollTop() != 0 ? '0' : '1'); $.get(update_url,function(data) { in_progress = false; diff --git a/mod/update_network.php b/mod/update_network.php index 65366d1377..ff668ab353 100644 --- a/mod/update_network.php +++ b/mod/update_network.php @@ -14,7 +14,7 @@ function update_network_content(&$a) { echo (($_GET['msie'] == 1) ? '
' : '
'); $no_auto_update = get_pconfig($profile_uid, "system", "no_auto_update"); - if ($no_auto_update <= 0) { + if (($no_auto_update <= 0) OR ($_GET['top'] == 1)) { $text = network_content($a,$profile_uid); if ($no_auto_update < 0) set_pconfig($profile_uid, "system", "no_auto_update", 1);