Browse Source

Scroll chat to bottom upon dialog double click

master
John Yong 7 years ago
parent
commit
5a14a4f926
  1. 4
      app/js/controllers.js
  2. 2
      app/partials/desktop/dialog.html

4
app/js/controllers.js

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

2
app/partials/desktop/dialog.html

@ -1,4 +1,4 @@ @@ -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_date" ng-bind="dialogMessage.dateText"></div>

Loading…
Cancel
Save