parent
0b15fa8f4b
commit
0859be8ab7
@ -1251,6 +1251,29 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$rootScope.$on('chat_update', function (e, chatID) {
|
||||||
|
var fullChat = chatsFull[chatID];
|
||||||
|
var chat = AppChatsManager.getChat(chatID);
|
||||||
|
if (!chat.photo || !fullChat) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var emptyPhoto = chat.photo == 'chatPhotoEmpty';
|
||||||
|
if (emptyPhoto != (fullChat.chat_photo._ == 'photoEmpty')) {
|
||||||
|
delete chatsFull[chatID];
|
||||||
|
$rootScope.$broadcast('chat_full_update', chatID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (emptyPhoto) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var smallUserpic = chat.photo.photo_small;
|
||||||
|
var smallPhotoSize = AppPhotosManager.choosePhotoSize(fullChat.chat_photo, 0, 0);
|
||||||
|
if (!angular.equals(smallUserpic, smallPhotoSize.location)) {
|
||||||
|
delete chatsFull[chatID];
|
||||||
|
$rootScope.$broadcast('chat_full_update', chatID);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getPeerBots: getPeerBots,
|
getPeerBots: getPeerBots,
|
||||||
getProfile: getProfile,
|
getProfile: getProfile,
|
||||||
|
Loading…
Reference in New Issue
Block a user