Improved scroll in history

This commit is contained in:
Igor Zhukov 2015-02-11 21:55:09 +03:00
parent e8bb9c870b
commit 868d95a181
3 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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);