Browse Source

Fixed grouping messages

Closes #293
master
Igor Zhukov 11 years ago
parent
commit
121e203bbc
  1. 2
      app/js/controllers.js
  2. 6
      app/partials/im.html

2
app/js/controllers.js

@ -550,7 +550,6 @@ angular.module('myApp.controllers', [])
!curMessage.action && !curMessage.action &&
curMessage.date < prevMessage.date + 900) { curMessage.date < prevMessage.date + 900) {
var singleLine = curMessage.message && curMessage.message.length < 70 && curMessage.message.indexOf("\n") == -1; var singleLine = curMessage.message && curMessage.message.length < 70 && curMessage.message.indexOf("\n") == -1;
curMessage.grouped = !curMessage.fwd_from_id && singleLine ? 1 : 2; curMessage.grouped = !curMessage.fwd_from_id && singleLine ? 1 : 2;
} else if (prevMessage || !i) { } else if (prevMessage || !i) {
@ -823,6 +822,7 @@ angular.module('myApp.controllers', [])
} }
}; };
$scope.history = newHistory; $scope.history = newHistory;
updateHistoryGroups();
} }
}) })

6
app/partials/im.html

@ -46,7 +46,7 @@
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span> <span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>
</div> </div>
<div class="im_dialog_message"> <div class="im_dialog_message">
<span class="im_dialog_message_text">{{contact.user | userStatus}}</span> <span class="im_dialog_message_text" ng-bind="contact.user | userStatus"></span>
</div> </div>
</div> </div>
</a> </a>
@ -88,7 +88,7 @@
</div> </div>
<a ng-show="mediaType !== false" class="im_history_panel_return_link pull-right" ng-click="toggleMedia()"> <a ng-show="mediaType !== false" class="im_history_panel_return_link pull-right" ng-click="toggleMedia()">
Show all messages Show all messages
<strong class="im_history_panel_return_count" ng-show="missedCount > 0">+{{missedCount}}</strong> <strong class="im_history_panel_return_count" ng-show="missedCount > 0" ng-bind="'+' + missedCount"></strong>
</a> </a>
<div ng-switch="mediaType"> <div ng-switch="mediaType">
@ -100,7 +100,7 @@
<h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()"> <h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div ng-switch-when="true"> <div ng-switch-when="true">
<span ng-bind-html="historyPeer.data.rFullName"></span> <span ng-bind-html="historyPeer.data.rFullName"></span>
<small class="im_peer_online">{{historyPeer.data | userStatus}}</small> <small class="im_peer_online" ng-bind="historyPeer.data | userStatus"></small>
</div> </div>
<div ng-switch-default> <div ng-switch-default>
<span ng-bind-html="historyPeer.data.rTitle"></span> <span ng-bind-html="historyPeer.data.rTitle"></span>

Loading…
Cancel
Save