|
|
@ -101,10 +101,13 @@ angular.module('myApp.directives', ['myApp.filters']) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if ($scope.historyMessage.unread) { |
|
|
|
|
|
|
|
var deregisterUnreadAfter; |
|
|
|
var deregisterUnreadAfter; |
|
|
|
if (!$scope.historyMessage.out) { |
|
|
|
if (!$scope.historyMessage.out && |
|
|
|
|
|
|
|
($scope.historyMessage.unread || $scope.historyMessage.unreadAfter)) { |
|
|
|
var applyUnreadAfter = function () { |
|
|
|
var applyUnreadAfter = function () { |
|
|
|
|
|
|
|
if ($scope.peerHistory.peerID != $scope.historyPeer.id) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
if (unreadAfter != ($scope.historyUnreadAfter == $scope.historyMessage.id)) { |
|
|
|
if (unreadAfter != ($scope.historyUnreadAfter == $scope.historyMessage.id)) { |
|
|
|
unreadAfter = !unreadAfter; |
|
|
|
unreadAfter = !unreadAfter; |
|
|
|
if (unreadAfter) { |
|
|
|
if (unreadAfter) { |
|
|
@ -124,6 +127,7 @@ angular.module('myApp.directives', ['myApp.filters']) |
|
|
|
applyUnreadAfter(); |
|
|
|
applyUnreadAfter(); |
|
|
|
deregisterUnreadAfter = $scope.$on('messages_unread_after', applyUnreadAfter); |
|
|
|
deregisterUnreadAfter = $scope.$on('messages_unread_after', applyUnreadAfter); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($scope.historyMessage.unread) { |
|
|
|
element.addClass(unreadClass); |
|
|
|
element.addClass(unreadClass); |
|
|
|
var deregisterUnread = $scope.$on('messages_read', function () { |
|
|
|
var deregisterUnread = $scope.$on('messages_read', function () { |
|
|
|
if (!$scope.historyMessage.unread) { |
|
|
|
if (!$scope.historyMessage.unread) { |
|
|
|