Browse Source

Improved peer-photolink perf

master
Igor Zhukov 9 years ago
parent
commit
85fdc86047
  1. 2
      app/js/directives.js
  2. 2
      app/less/desktop.less
  3. 2
      app/partials/desktop/im.html

2
app/js/directives.js

@ -2653,7 +2653,6 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -2653,7 +2653,6 @@ angular.module('myApp.directives', ['myApp.filters'])
};
function link($scope, element, attrs) {
element.addClass('peer_photo_init');
var peerID, peer, peerPhoto;
@ -2729,6 +2728,7 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -2729,6 +2728,7 @@ angular.module('myApp.directives', ['myApp.filters'])
}
$scope.$watch(attrs.myPeerPhotolink, setPeerID);
setPeerID($scope.$eval(attrs.myPeerPhotolink));
if (attrs.watch) {
$scope.$on('user_update', function (e, updUserID) {

2
app/less/desktop.less

@ -1291,7 +1291,7 @@ a.im_panel_peer_photo .peer_initials { @@ -1291,7 +1291,7 @@ a.im_panel_peer_photo .peer_initials {
&_form_wrap {
a.im_panel_own_photo,
a.im_panel_peer_photo {
margin-top: 47px;
margin-top: 41px;
}
}

2
app/partials/desktop/im.html

@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
<form my-send-form draft-message="draftMessage" mentions="mentions" commands="commands" class="im_send_form" ng-class="{im_send_form_empty: !draftMessage.text.length}">
<div class="im_send_reply_wrap" ng-if="draftMessage.replyToMessage != null">
<a class="im_send_reply_cancel" ng-click="draftMessage.replyClear()"><i class="icon icon-reply-bar"></i><i class="icon icon-reply-bar"></i></a>
<a class="im_send_reply_cancel" ng-mousedown="draftMessage.replyClear()"><i class="icon icon-reply-bar"></i><i class="icon icon-reply-bar"></i></a>
<a class="im_message_reply_wrap" my-reply-message="draftMessage.replyToMessage" watch="true"></a>
</div>

Loading…
Cancel
Save