Fixed unread after

This commit is contained in:
Igor Zhukov 2014-09-19 19:54:13 +04:00
parent d766216c14
commit f1cb4d3957

View File

@ -1064,12 +1064,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if (historyResult.unreadOffset) { if (historyResult.unreadOffset) {
$scope.historyUnreadAfter = historyResult.history[historyResult.unreadOffset - 1]; $scope.historyUnreadAfter = historyResult.history[historyResult.unreadOffset - 1];
$scope.$broadcast('messages_unread_after');
} }
else if ($scope.historyUnreadAfter) { else if ($scope.historyUnreadAfter) {
delete $scope.historyUnreadAfter; delete $scope.historyUnreadAfter;
$scope.$broadcast('messages_unread_after');
} }
$scope.$broadcast('messages_unread_after');
onContentLoaded(function () { onContentLoaded(function () {
$scope.$broadcast('messages_focus', $scope.curDialog.messageID || 0); $scope.$broadcast('messages_focus', $scope.curDialog.messageID || 0);
}); });