Browse Source

Simplified double click

master
Igor Zhukov 8 years ago
parent
commit
81f041780e
  1. 6
      app/js/controllers.js
  2. 2
      app/partials/desktop/dialog.html

6
app/js/controllers.js

@ -456,7 +456,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
var pendingAttachment = false var pendingAttachment = false
$scope.$on('history_focus', function (e, peerData) { $scope.$on('history_focus', function (e, peerData) {
if (peerData.peerString == $scope.curDialog.peer && if (peerData.peerString == $scope.curDialog.peer &&
peerData.messageID == $scope.curDialog.messageID && (peerData.messageID ? peerData.messageID == $scope.curDialog.messageID : !$scope.curDialog.messageID) &&
!peerData.startParam) { !peerData.startParam) {
if (peerData.messageID) { if (peerData.messageID) {
$scope.$broadcast('ui_history_change_scroll', true) $scope.$broadcast('ui_history_change_scroll', true)
@ -603,10 +603,6 @@ 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 () {

2
app/partials/desktop/dialog.html

@ -1,4 +1,4 @@
<a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, dialogMessage.unreadCount == -1 && dialogMessage.mid)" ng-dblclick="scrollChatToBottom()"> <a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, dialogMessage.unreadCount == -1 && dialogMessage.mid)">
<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>

Loading…
Cancel
Save