Fixed close photo, hide unread dot
This commit is contained in:
parent
b740c8902d
commit
29192ea029
@ -526,11 +526,11 @@ a.im_dialog:hover .im_dialog_message_text {
|
||||
background: #c1d6e5;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
margin: 8px 0 0;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
a.im_dialog:hover .im_dialog_unread {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" href="vendor/angular/angular-csp.css"/>
|
||||
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css"/>
|
||||
<link rel="stylesheet" href="vendor/jquery.nanoscroller/nanoscroller.css"/>
|
||||
<link rel="stylesheet" href="css/app.css?21"/>
|
||||
<link rel="stylesheet" href="css/app.css?22"/>
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon" />
|
||||
|
||||
<meta property="og:title" content="Webogram">
|
||||
@ -52,8 +52,8 @@
|
||||
|
||||
<script type="text/javascript" src="js/util.js?1"></script>
|
||||
<script type="text/javascript" src="js/app.js?15"></script>
|
||||
<script type="text/javascript" src="js/services.js?18"></script>
|
||||
<script type="text/javascript" src="js/controllers.js?26"></script>
|
||||
<script type="text/javascript" src="js/services.js?19"></script>
|
||||
<script type="text/javascript" src="js/controllers.js?27"></script>
|
||||
<script type="text/javascript" src="js/filters.js?3"></script>
|
||||
<script type="text/javascript" src="js/directives.js?17"></script>
|
||||
|
||||
|
@ -220,7 +220,7 @@ angular.module('myApp.controllers', [])
|
||||
var wrappedDialog = AppMessagesManager.wrapForDialog(dialog.top_message, dialog.unread_count);
|
||||
if (pos !== false) {
|
||||
var prev = $scope.dialogs.splice(pos, 1);
|
||||
wrappedDialog = angular.extend(prev[0], wrappedDialog);
|
||||
// wrappedDialog = angular.extend(prev[0], wrappedDialog);
|
||||
offset++;
|
||||
}
|
||||
$scope.dialogs.unshift(wrappedDialog);
|
||||
|
@ -507,6 +507,7 @@ angular.module('myApp.services', [])
|
||||
|
||||
var messagesStorage = {};
|
||||
var messagesForHistory = {};
|
||||
var messagesForDialogs = {};
|
||||
var historiesStorage = {};
|
||||
var dialogsStorage = {count: null, dialogs: []};
|
||||
var pendingByRandomID = {};
|
||||
@ -757,6 +758,9 @@ angular.module('myApp.services', [])
|
||||
if (messagesForHistory[messageID]) {
|
||||
messagesForHistory[messageID].unread = false;
|
||||
}
|
||||
if (messagesForDialogs[messageID]) {
|
||||
messagesForDialogs[messageID].unread = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1047,6 +1051,10 @@ angular.module('myApp.services', [])
|
||||
}
|
||||
|
||||
function wrapForDialog (msgID, unreadCount) {
|
||||
if (messagesForDialogs[msgID] !== undefined) {
|
||||
return messagesForDialogs[msgID];
|
||||
}
|
||||
|
||||
var message = angular.copy(messagesStorage[msgID]) || {id: msgID};
|
||||
|
||||
message.fromUser = AppUsersManager.getUser(message.from_id);
|
||||
@ -1073,7 +1081,7 @@ angular.module('myApp.services', [])
|
||||
}
|
||||
|
||||
|
||||
return message;
|
||||
return messagesForDialogs[msgID] = message;
|
||||
}
|
||||
|
||||
function wrapForHistory (msgID) {
|
||||
@ -1297,9 +1305,11 @@ angular.module('myApp.services', [])
|
||||
if (message) {
|
||||
message.unread = false;
|
||||
if (messagesForHistory[messageID]) {
|
||||
// console.log(222, messagesForHistory[messageID]);
|
||||
messagesForHistory[messageID].unread = false;
|
||||
}
|
||||
if (messagesForDialogs[messageID]) {
|
||||
messagesForDialogs[messageID].unread = false;
|
||||
}
|
||||
peerID = getMessagePeer(message);
|
||||
if (!message.out) {
|
||||
foundDialog = getDialogByPeerID(peerID);
|
||||
@ -1315,7 +1325,6 @@ angular.module('myApp.services', [])
|
||||
angular.forEach(dialogsUpdated, function(count, peerID) {
|
||||
$rootScope.$broadcast('dialog_unread', {peerID: peerID, count: count});
|
||||
});
|
||||
// $rootScope.$broadcast('history_update');
|
||||
break;
|
||||
}
|
||||
});
|
||||
@ -1437,8 +1446,7 @@ angular.module('myApp.services', [])
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'partials/photo_modal.html?1',
|
||||
controller: 'PhotoModalController',
|
||||
scope: scope,
|
||||
backdrop: 'static'
|
||||
scope: scope
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user