Bugfixes
This commit is contained in:
parent
04e16fa684
commit
807b30a3be
@ -1507,7 +1507,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
}, 2800);
|
}, 2800);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppMessagesManager.readHistory($scope.curDialog.peerID);
|
if (!$rootScope.idle.isIDLE) {
|
||||||
|
AppMessagesManager.readHistory($scope.curDialog.peerID);
|
||||||
|
}
|
||||||
|
|
||||||
updateBotActions();
|
updateBotActions();
|
||||||
updateChannelActions();
|
updateChannelActions();
|
||||||
@ -2074,7 +2076,8 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
}
|
}
|
||||||
if (!newVal) {
|
if (!newVal) {
|
||||||
unreadAfterIdle = false;
|
unreadAfterIdle = false;
|
||||||
if (loadAfterSync == $scope.curDialog.peerID) {
|
if (loadAfterSync &&
|
||||||
|
loadAfterSync == $scope.curDialog.peerID) {
|
||||||
loadHistory();
|
loadHistory();
|
||||||
loadAfterSync = false;
|
loadAfterSync = false;
|
||||||
}
|
}
|
||||||
|
@ -2064,8 +2064,11 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
height: $scope.document.thumb.height
|
height: $scope.document.thumb.height
|
||||||
});
|
});
|
||||||
|
|
||||||
var smallLocation = angular.copy($scope.document.thumb.location);
|
var smallLocation = false;
|
||||||
smallLocation.sticker = true;
|
if ($scope.document.thumb.location) {
|
||||||
|
smallLocation = angular.copy($scope.document.thumb.location);
|
||||||
|
smallLocation.sticker = true;
|
||||||
|
}
|
||||||
|
|
||||||
var fullLocation = {
|
var fullLocation = {
|
||||||
_: 'inputDocumentFileLocation',
|
_: 'inputDocumentFileLocation',
|
||||||
@ -2094,7 +2097,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
imgElement.attr('src', emptySrc).appendTo(element);
|
imgElement.attr('src', emptySrc).appendTo(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attrs.thumb) {
|
if (attrs.thumb && smallLocation) {
|
||||||
MtpApiFileManager.downloadSmallFile(smallLocation).then(function (blob) {
|
MtpApiFileManager.downloadSmallFile(smallLocation).then(function (blob) {
|
||||||
setSrc(blob);
|
setSrc(blob);
|
||||||
}, function (e) {
|
}, function (e) {
|
||||||
|
@ -228,7 +228,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
|
|||||||
performRequest(cachedNetworker);
|
performRequest(cachedNetworker);
|
||||||
}, waitTime * 1000);
|
}, waitTime * 1000);
|
||||||
}
|
}
|
||||||
else if (!options.rawError && error.code == 500) {
|
else if (!options.rawError && (error.code == 500 || error.type == 'MSG_WAIT_FAILED')) {
|
||||||
var now = tsNow();
|
var now = tsNow();
|
||||||
if (options.stopTime) {
|
if (options.stopTime) {
|
||||||
if (now >= options.stopTime) {
|
if (now >= options.stopTime) {
|
||||||
|
@ -152,11 +152,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
var timeNow = tsNow(true) + serverTimeOffset;
|
var timeNow = tsNow(true) + serverTimeOffset;
|
||||||
switch (status._) {
|
switch (status._) {
|
||||||
case 'userStatusRecently':
|
case 'userStatusRecently':
|
||||||
return tsNow(true) + serverTimeOffset - 86400 * 3;
|
return timeNow - 86400 * 3;
|
||||||
case 'userStatusLastWeek':
|
case 'userStatusLastWeek':
|
||||||
return tsNow(true) + serverTimeOffset - 86400 * 7;
|
return timeNow - 86400 * 7;
|
||||||
case 'userStatusLastMonth':
|
case 'userStatusLastMonth':
|
||||||
return tsNow(true) + serverTimeOffset - 86400 * 30;
|
return timeNow - 86400 * 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1064,6 +1064,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
if (chatFullPromises[id] !== undefined) {
|
if (chatFullPromises[id] !== undefined) {
|
||||||
return chatFullPromises[id];
|
return chatFullPromises[id];
|
||||||
}
|
}
|
||||||
|
// console.trace('get chat full');
|
||||||
return chatFullPromises[id] = MtpApiManager.invokeApi('messages.getFullChat', {
|
return chatFullPromises[id] = MtpApiManager.invokeApi('messages.getFullChat', {
|
||||||
chat_id: AppChatsManager.getChatInput(id)
|
chat_id: AppChatsManager.getChatInput(id)
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
@ -1257,7 +1258,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
if (!chat.photo || !fullChat) {
|
if (!chat.photo || !fullChat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var emptyPhoto = chat.photo == 'chatPhotoEmpty';
|
var emptyPhoto = chat.photo._ == 'chatPhotoEmpty';
|
||||||
if (emptyPhoto != (fullChat.chat_photo._ == 'photoEmpty')) {
|
if (emptyPhoto != (fullChat.chat_photo._ == 'photoEmpty')) {
|
||||||
delete chatsFull[chatID];
|
delete chatsFull[chatID];
|
||||||
$rootScope.$broadcast('chat_full_update', chatID);
|
$rootScope.$broadcast('chat_full_update', chatID);
|
||||||
|
Loading…
Reference in New Issue
Block a user