|
|
@ -18,12 +18,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
$location.url('/im') |
|
|
|
$location.url('/im') |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (location.protocol == 'http:' && |
|
|
|
|
|
|
|
!Config.Modes.http && |
|
|
|
|
|
|
|
Config.App.domains.indexOf(location.hostname) != -1) { |
|
|
|
|
|
|
|
location.href = location.href.replace(/^http:/, 'https:') |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$location.url('/login') |
|
|
|
$location.url('/login') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -40,12 +34,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
$location.url('/im') |
|
|
|
$location.url('/im') |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (location.protocol == 'http:' && |
|
|
|
|
|
|
|
!Config.Modes.http && |
|
|
|
|
|
|
|
Config.App.domains.indexOf(location.hostname) != -1) { |
|
|
|
|
|
|
|
location.href = location.href.replace(/^http:/, 'https:') |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
TelegramMeWebService.setAuthorized(false) |
|
|
|
TelegramMeWebService.setAuthorized(false) |
|
|
|
WebPushApiManager.forceUnsubscribe() |
|
|
|
WebPushApiManager.forceUnsubscribe() |
|
|
|
}) |
|
|
|
}) |
|
|
@ -454,7 +442,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
LayoutSwitchService.start() |
|
|
|
LayoutSwitchService.start() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
.controller('AppIMController', function ($q, qSync, $scope, $location, $routeParams, $modal, $rootScope, $modalStack, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ContactsSelectService, ChangelogNotifyService, ErrorService, AppRuntimeManager, HttpsMigrateService, LayoutSwitchService, LocationParamsService, AppStickersManager) { |
|
|
|
.controller('AppIMController', function ($q, qSync, $scope, $location, $routeParams, $modal, $rootScope, $modalStack, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ContactsSelectService, ChangelogNotifyService, ErrorService, AppRuntimeManager, LayoutSwitchService, LocationParamsService, AppStickersManager) { |
|
|
|
$scope.$on('$routeUpdate', updateCurDialog) |
|
|
|
$scope.$on('$routeUpdate', updateCurDialog) |
|
|
|
|
|
|
|
|
|
|
|
var pendingParams = false |
|
|
|
var pendingParams = false |
|
|
@ -686,7 +674,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ChangelogNotifyService.checkUpdate() |
|
|
|
ChangelogNotifyService.checkUpdate() |
|
|
|
HttpsMigrateService.start() |
|
|
|
|
|
|
|
LayoutSwitchService.start() |
|
|
|
LayoutSwitchService.start() |
|
|
|
LocationParamsService.start() |
|
|
|
LocationParamsService.start() |
|
|
|
AppStickersManager.start() |
|
|
|
AppStickersManager.start() |
|
|
|