Skip to content

Commit

Permalink
Performance improvements
Browse files Browse the repository at this point in the history
Updated some watch expressions
Upgrade AngularJS to 1.3.0-rc.0
  • Loading branch information
zhukov committed Sep 10, 2014
1 parent 4d4d087 commit bfc8ffd
Show file tree
Hide file tree
Showing 483 changed files with 10,645 additions and 8,973 deletions.
2 changes: 1 addition & 1 deletion app/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ angular.module('myApp.directives', ['myApp.filters'])
scope: {
userID: '=myUserPhotolink'
},
template: '<img my-load-thumb thumb="photo" /><i class="icon icon-online" ng-if="::showStatus" ng-show="user.status._ == \'userStatusOnline\'"></i>'
template: '<img my-load-thumb thumb="photo" /><i class="icon icon-online" ng-if="::showStatus || false" ng-show="user.status._ == \'userStatusOnline\'"></i>'
};

function link($scope, element, attrs) {
Expand Down
2 changes: 1 addition & 1 deletion app/partials/im.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h3 class="im_dialogs_empty_header">No contacts yet</h3>
</ul>
</div>

<div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">
<div class="im_dialogs_contacts_wrap" ng-show="!search.messages &amp;&amp; contacts.length > 0">
<h5>Contacts</h5>
<ul class="nav nav-pills nav-stacked">
<li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:'user.sortName' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">
Expand Down
18 changes: 9 additions & 9 deletions app/partials/message.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="im_message_unread_split" ng-if="::historyUnreadAfter == historyMessage.id" ng-show="historyUnreadAfter == historyMessage.id">
<div class="im_message_unread_split" ng-if="::historyUnreadAfter == historyMessage.id || false" ng-show="historyUnreadAfter == historyMessage.id">
Unread messages
</div>

<div class="im_message_date_split im_service_message_wrap" ng-if="::historyMessage.needDate" ng-show="historyMessage.needDate">
<div class="im_message_date_split im_service_message_wrap" ng-if="::historyMessage.needDate || false" ng-show="historyMessage.needDate">
<div class="im_service_message" ng-bind="historyMessage.date | myDate"></div>
</div>

<div class="im_message_outer_wrap" ng-class="[ selectedMsgs[historyMessage.id] &amp;&amp; 'im_message_selected', historyMessage.grouped, historyFocus == historyMessage.id ? 'im_message_focus' : '']" ng-click="toggleMessage(historyMessage.id, $event)">
<div class="im_message_outer_wrap" ng-class="[selectedMsgs[historyMessage.id] ? 'im_message_selected' : '', historyMessage.grouped, historyFocus == historyMessage.id ? 'im_message_focus' : '', historyMessage.unread ? 'im_message_unread' : '', historyMessage.error ? 'im_message_error' : '', historyMessage.pending ? 'im_message_pending' : '']" ng-click="toggleMessage(historyMessage.id, $event)">


<div class="im_message_wrap clearfix">
Expand All @@ -27,16 +27,16 @@

</div>

<div ng-if="::historyMessage._ != 'messageService'" class="im_content_message_wrap" ng-class="{im_message_unread: historyMessage.unread, im_message_out: historyMessage.out, im_message_in: !historyMessage.out, im_message_error: historyMessage.error, im_message_pending: historyMessage.pending, im_message_fwd: historyMessage._ == 'messageForwarded'}">
<div ng-if="::historyMessage._ != 'messageService'" class="im_content_message_wrap" ng-class="::[historyMessage.out ? 'im_message_out' : 'im_message_in', historyMessage._ == 'messageForwarded' ? 'im_message_fwd' : '']">
<div class="im_content_message_select_area">
<i class="icon icon-select-tick"></i>
</div>

<a class="im_message_error_btn" ng-if="::historyMessage.pending || historyMessage.error" ng-click="historyMessage.send()">
<a class="im_message_error_btn" ng-if="::historyMessage.pending || historyMessage.error || false" ng-click="historyMessage.send()">
<i class="icon-message-status" tooltip="Try again"></i>
</a>

<i ng-if="::historyMessage.unread || historyMessage.pending" class="icon-message-status" ng-class="{'icon-message-status-unread': historyMessage.unread, 'icon-message-status-pending': historyMessage.pending}" ng-show="!historyMessage.error"></i>
<i ng-if="::historyMessage.unread || historyMessage.pending || false" class="icon-message-status" ng-class="{'icon-message-status-unread': historyMessage.unread, 'icon-message-status-pending': historyMessage.pending}" ng-show="!historyMessage.error"></i>

<a class="im_message_from_photo pull-left" my-user-photolink="historyMessage.from_id" img-class="im_message_from_photo"></a>

Expand All @@ -49,15 +49,15 @@

<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a>

<div ng-if="::historyMessage._ == 'messageForwarded'" class="im_message_fwd_from">
<div ng-if="::historyMessage._ == 'messageForwarded' || false" class="im_message_fwd_from">
<div class="im_message_fwd_title" ng-if="::historyMessage.grouped == 'im_grouped_fwd_start'">Forwarded message</div>
<a class="im_message_fwd_photo pull-left" my-user-photolink="historyMessage.fwd_from_id" img-class="im_message_fwd_photo"></a>
<div class="im_message_fwd_author_wrap">
<a class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id" short="true"></a><span class="im_message_fwd_date" ng-bind="historyMessage.fwd_date | dateOrTime"></span>
</div>
</div>

<div ng-if="::historyMessage.media &amp;&amp; historyMessage.media._ != 'messageMediaEmpty'" class="im_message_media" ng-switch="historyMessage.media._">
<div ng-if="::historyMessage.media &amp;&amp; historyMessage.media._ != 'messageMediaEmpty' || false" class="im_message_media" ng-switch="historyMessage.media._">

<div ng-switch-when="messageMediaPhoto" my-message-photo></div>
<div ng-switch-when="messageMediaVideo" my-message-video></div>
Expand All @@ -69,7 +69,7 @@

</div>

<div class="im_message_text" ng-if="::historyMessage.message.length" ng-bind-html="::historyMessage.richMessage"></div>
<div class="im_message_text" ng-if="::historyMessage.message.length || false" ng-bind-html="::historyMessage.richMessage"></div>
</div>

</div>
Expand Down
Loading

0 comments on commit bfc8ffd

Please sign in to comment.