Fixed session revoke handling, fixed undefined location, IM styles
This commit is contained in:
parent
c3b9fdfc75
commit
dd7d5d91ca
@ -2206,7 +2206,7 @@ a.contacts_modal_contact:hover .contacts_modal_contact_status {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
width: 112px;
|
||||
height: 50px;
|
||||
height: 52px;
|
||||
margin: -8px 0 0 -112px;
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
|
@ -300,7 +300,9 @@ angular.module('myApp.controllers', [])
|
||||
|
||||
}, function (error) {
|
||||
if (error.code == 401) {
|
||||
$location.url('/login');
|
||||
MtpApiManager.logOut()['finally'](function () {
|
||||
$location.url('/login');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -89,12 +89,16 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
return;
|
||||
}
|
||||
|
||||
if (!headWrap) {
|
||||
if (!headWrap || !headWrap.offsetHeight) {
|
||||
headWrap = $('.tg_page_head')[0];
|
||||
}
|
||||
if (!footer || !footer.offsetHeight) {
|
||||
footer = $('.im_page_footer')[0];
|
||||
}
|
||||
$(element).css({
|
||||
height: $($window).height() - footer.offsetHeight - (headWrap ? headWrap.offsetHeight : 44) - 72
|
||||
});
|
||||
|
||||
updateScroller();
|
||||
}
|
||||
|
||||
@ -276,6 +280,12 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
});
|
||||
}
|
||||
|
||||
if (!headWrap || !headWrap.offsetHeight) {
|
||||
headWrap = $('.tg_page_head')[0];
|
||||
}
|
||||
if (!footer || !footer.offsetHeight) {
|
||||
footer = $('.im_page_footer')[0];
|
||||
}
|
||||
var historyH = $($window).height() - panelWrap.offsetHeight - bottomPanelWrap.offsetHeight - (headWrap ? headWrap.offsetHeight : 44) - footer.offsetHeight;
|
||||
$(historyWrap).css({
|
||||
height: historyH
|
||||
@ -496,7 +506,8 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
var cachedSrc = MtpApiFileManager.getCachedFile(
|
||||
scope.thumb &&
|
||||
scope.thumb.location &&
|
||||
!scope.thumb.location.empty
|
||||
!scope.thumb.location.empty &&
|
||||
scope.thumb.location
|
||||
);
|
||||
|
||||
if (cachedSrc) {
|
||||
|
@ -2333,6 +2333,12 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker
|
||||
return mtpInvokeApi('auth.logOut').then(function () {
|
||||
AppConfigManager.remove('dc', 'user_auth');
|
||||
|
||||
baseDcID = false;
|
||||
}, function (error) {
|
||||
AppConfigManager.remove('dc', 'user_auth');
|
||||
if (error && error.code != 401) {
|
||||
AppConfigManager.remove('dc' + baseDcID + '_auth_key');
|
||||
}
|
||||
baseDcID = false;
|
||||
});
|
||||
}
|
||||
@ -2597,6 +2603,11 @@ factory('MtpApiFileManager', function (MtpApiManager, $q, $window) {
|
||||
case 'inputAudioFileLocation':
|
||||
return 'audio' + location.id;
|
||||
}
|
||||
|
||||
if (!location.volume_id) {
|
||||
console.trace('Empty location', location);
|
||||
}
|
||||
|
||||
return location.volume_id + '_' + location.local_id + '_' + location.secret + '.jpg';
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user