aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-01-28 02:48:57 -0800
committerzotlabs <mike@macgirvin.com>2019-01-28 02:48:57 -0800
commit043f7bf2abe069c7ac504e0b944db3c0e4318688 (patch)
treef9634791642a874745c079643b340c9396b64cd7 /view/js
parent625cdde9a40d13b47a794c6202add2c8f647aebe (diff)
parente3d39fbf3fe99c6ce9de256290e83c49fea8808b (diff)
downloadvolse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.tar.gz
volse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.tar.bz2
volse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 017d39353..fca9d125d 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -468,6 +468,9 @@ function notificationsUpdate(cached_data) {
$.get(pingCmd,function(data) {
// Put the object into storage
+ if(! data)
+ return;
+
sessionStorage.setItem('notifications_cache', JSON.stringify(data));
var fnotifs = [];
@@ -766,7 +769,7 @@ function updateConvItems(mode,data) {
mediaPlaying = false;
});
- var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; }));
+ var bimgs = ((preloadImages) ? false : $(".wall-item-body img, .wall-photo-item img").not(function() { return this.complete; }));
var bimgcount = bimgs.length;
if (bimgcount) {
@@ -842,10 +845,10 @@ function collapseHeight() {
});
var collapsedContentHeight = Math.ceil($("#region_2").height());
- contentHeightDiff = origContentHeight - collapsedContentHeight;
+ contentHeightDiff = liking ? 0 : origContentHeight - collapsedContentHeight;
console.log('collapseHeight() - contentHeightDiff: ' + contentHeightDiff + 'px');
- if(i){
+ if(i && !liking){
var sval = position - cDiff + ($(".divgrow-showmore").outerHeight() * i);
console.log('collapsed above viewport count: ' + i);
$(window).scrollTop(sval);
@@ -996,7 +999,7 @@ function liveUpdate(notify_id) {
$("#profile-jot-text-loading").hide();
// adjust scroll position if new content was added above viewport
- if(update_mode === 'update') {
+ if(update_mode === 'update' && !justifiedGalleryActive) {
$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
}