From 868d95a1810ea4c7d03be64dc81c8eb8592d9ccf Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 11 Feb 2015 21:55:09 +0300 Subject: [PATCH] Improved scroll in history --- app/js/controllers.js | 4 ++-- app/js/directives.js | 1 + app/js/services.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 3504db08..5408a24b 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1136,8 +1136,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) if ($scope.curDialog.messageID) { maxID = parseInt($scope.curDialog.messageID); - limit = 10; - backLimit = 10; + limit = 20; + backLimit = 20; } else if (forceRecent) { limit = 10; diff --git a/app/js/directives.js b/app/js/directives.js index e791ddee..c7d4a209 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -911,6 +911,7 @@ angular.module('myApp.directives', ['myApp.filters']) if (scrollTopInitial >= 0) { changeScroll(); } else { + // console.log('change scroll prepend'); scrollableWrap.scrollTop = st + scrollableWrap.scrollHeight - sh; } diff --git a/app/js/services.js b/app/js/services.js index e265af80..38ce1a78 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -952,8 +952,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) if (foundDialog && foundDialog[0] && foundDialog[0].unread_count > 1) { var unreadCount = foundDialog[0].unread_count; if (unreadSkip = (unreadCount > 50)) { - limit = 10; - unreadOffset = 6; + limit = 20; + unreadOffset = 16; offset = unreadCount - unreadOffset; } else { limit = Math.max(10, prerendered, unreadCount + 2);