Browse Source

Bugfixes

master
Igor Zhukov 9 years ago
parent
commit
6e27162ed1
  1. 6
      app/js/directives.js
  2. 4
      app/js/messages_manager.js
  3. 1
      app/less/app.less

6
app/js/directives.js

@ -276,18 +276,14 @@ angular.module('myApp.directives', ['myApp.filters'])
} }
$scope.$on('message_edit', function (e, data) { $scope.$on('message_edit', function (e, data) {
// var message = $scope.message;
// message = $scope.$parent.$eval(attrs.myMessageBody);
message = AppMessagesManager.wrapForHistory(message.mid);
if (data.mid != message.mid) { if (data.mid != message.mid) {
return; return;
} }
console.log('after edit', message.dir, message); // console.log(dT(), 'Directive' edit', message);
updateMessageText($scope, element, message); updateMessageText($scope, element, message);
updateMessageMedia($scope, element, message); updateMessageMedia($scope, element, message);
updateMessageKeyboard($scope, element, message); updateMessageKeyboard($scope, element, message);
$scope.$emit('ui_height'); $scope.$emit('ui_height');
message.dir = true;
}); });
} }
}) })

4
app/js/messages_manager.js

@ -2798,7 +2798,9 @@ angular.module('myApp.services')
var wasForHistory = messagesForHistory[mid]; var wasForHistory = messagesForHistory[mid];
if (wasForHistory !== undefined) { if (wasForHistory !== undefined) {
delete messagesForHistory[mid]; delete messagesForHistory[mid];
safeReplaceObject(wasForHistory, wrapForHistory(mid)); var newForHistory = wrapForHistory(mid);
safeReplaceObject(wasForHistory, newForHistory);
messagesForHistory[mid] = wasForHistory;
} }
$rootScope.$broadcast('message_edit', { $rootScope.$broadcast('message_edit', {
peerID: peerID, peerID: peerID,

1
app/less/app.less

@ -1778,6 +1778,7 @@ div.im_message_video_thumb {
.im_history_select_active { .im_history_select_active {
a, a,
button,
.clickable { .clickable {
pointer-events: none; pointer-events: none;
} }

Loading…
Cancel
Save