From edbb2e6d7f368f1a249bf8e598a8f431a21e1278 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 14 Feb 2015 23:03:38 +0300 Subject: [PATCH] Disabled scroll change on idle Fixed #666 --- app/js/controllers.js | 2 +- app/js/directives.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 01394586..6ebcba04 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1393,7 +1393,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) if (curPeer) { $scope.historyState.typing.splice(0, $scope.historyState.typing.length); - $scope.$broadcast('ui_history_append_new', {my: addedMessage.my}); + $scope.$broadcast('ui_history_append_new', {my: addedMessage.my, idle: $rootScope.idle.isIDLE}); if (addedMessage.my && $scope.historyUnreadAfter) { delete $scope.historyUnreadAfter; $scope.$broadcast('messages_unread_after'); diff --git a/app/js/directives.js b/app/js/directives.js index f9763bf4..00ec3866 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -800,7 +800,7 @@ angular.module('myApp.directives', ['myApp.filters']) curAnimation = false; $scope.$on('ui_history_append_new', function (e, options) { - if (!atBottom && !options.my) { + if ((!atBottom || options.idle) && !options.my) { return; } var curAnimated = animated &&