Improved migrate to supergroup check
This commit is contained in:
parent
da3578fc06
commit
bd52715f18
@ -3410,13 +3410,13 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
$scope.chatFull = AppChatsManager.wrapForFull($scope.chatID, chatFull);
|
||||
$scope.$broadcast('ui_height');
|
||||
|
||||
$scope.canMigrate = $scope.chatFull &&
|
||||
$scope.chatFull.participants &&
|
||||
$scope.chatFull.participants.participants &&
|
||||
$scope.chatFull.participants.participants.length >= 200;
|
||||
$scope.needMigrate = $scope.chatFull &&
|
||||
$scope.chatFull.participants &&
|
||||
$scope.chatFull.participants.participants &&
|
||||
$scope.chatFull.participants.participants.length >= 200;
|
||||
|
||||
if (Config.Modes.test || Config.Modes.debug) {
|
||||
$scope.canMigrate = true;
|
||||
$scope.needMigrate = true;
|
||||
}
|
||||
|
||||
NotificationsManager.savePeerSettings(-$scope.chatID, chatFull.notify_settings);
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="md_modal_iconed_section_wrap md_modal_iconed_section_link" ng-if="chatFull.chat.pFlags.creator && canMigrate">
|
||||
<div class="md_modal_iconed_section_wrap md_modal_iconed_section_link" ng-if="chatFull.chat.pFlags.creator">
|
||||
|
||||
<div class="md_modal_section_link_wrap">
|
||||
<a class="md_modal_section_link" ng-click="migrateToSuperGroup()" my-i18n="group_modal_migrate_to_supergroup"></a>
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
<div ng-if="chatFull.chat._ != 'chatForbidden' && !chatFull.chat.pFlags.left && chatFull.participants.participants.length > 0">
|
||||
|
||||
<div ng-switch="chatFull.chat.pFlags.creator && canMigrate">
|
||||
<div ng-switch="chatFull.chat.pFlags.creator && needMigrate">
|
||||
<div ng-switch-when="true" class="md_modal_section_splitter md_modal_section_splitter_content">
|
||||
<h4 class="chat_modal_migrate_header" my-i18n="group_modal_migrate_header"></h4>
|
||||
<p class="chat_modal_migrate_description" my-i18n="group_modal_migrate_desc"></p>
|
||||
|
Loading…
Reference in New Issue
Block a user