Browse Source

Improved scroll in history

master
Igor Zhukov 10 years ago
parent
commit
868d95a181
  1. 4
      app/js/controllers.js
  2. 1
      app/js/directives.js
  3. 4
      app/js/services.js

4
app/js/controllers.js

@ -1136,8 +1136,8 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if ($scope.curDialog.messageID) { if ($scope.curDialog.messageID) {
maxID = parseInt($scope.curDialog.messageID); maxID = parseInt($scope.curDialog.messageID);
limit = 10; limit = 20;
backLimit = 10; backLimit = 20;
} }
else if (forceRecent) { else if (forceRecent) {
limit = 10; limit = 10;

1
app/js/directives.js

@ -911,6 +911,7 @@ angular.module('myApp.directives', ['myApp.filters'])
if (scrollTopInitial >= 0) { if (scrollTopInitial >= 0) {
changeScroll(); changeScroll();
} else { } else {
// console.log('change scroll prepend');
scrollableWrap.scrollTop = st + scrollableWrap.scrollHeight - sh; scrollableWrap.scrollTop = st + scrollableWrap.scrollHeight - sh;
} }

4
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) { if (foundDialog && foundDialog[0] && foundDialog[0].unread_count > 1) {
var unreadCount = foundDialog[0].unread_count; var unreadCount = foundDialog[0].unread_count;
if (unreadSkip = (unreadCount > 50)) { if (unreadSkip = (unreadCount > 50)) {
limit = 10; limit = 20;
unreadOffset = 6; unreadOffset = 16;
offset = unreadCount - unreadOffset; offset = unreadCount - unreadOffset;
} else { } else {
limit = Math.max(10, prerendered, unreadCount + 2); limit = Math.max(10, prerendered, unreadCount + 2);

Loading…
Cancel
Save