Scroll chat to bottom upon dialog double click

This commit is contained in:
John Yong 2017-04-06 15:47:09 +08:00
parent 6e6c74c5c1
commit 5a14a4f926
2 changed files with 5 additions and 1 deletions

View File

@ -603,6 +603,10 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$rootScope.$broadcast('history_focus', params) $rootScope.$broadcast('history_focus', params)
} }
$scope.scrollChatToBottom = function () {
$scope.$broadcast('ui_history_change_scroll', true)
}
$scope.logOut = function () { $scope.logOut = function () {
ErrorService.confirm({type: 'LOGOUT'}).then(function () { ErrorService.confirm({type: 'LOGOUT'}).then(function () {
MtpApiManager.logOut().then(function () { MtpApiManager.logOut().then(function () {

View File

@ -1,4 +1,4 @@
<a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, dialogMessage.unreadCount == -1 && dialogMessage.mid)"> <a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, dialogMessage.unreadCount == -1 && dialogMessage.mid)" ng-dblclick="scrollChatToBottom()">
<div class="im_dialog_meta pull-right text-right"> <div class="im_dialog_meta pull-right text-right">
<div class="im_dialog_date" ng-bind="dialogMessage.dateText"></div> <div class="im_dialog_date" ng-bind="dialogMessage.dateText"></div>