Added confirm before leaving channel / supergroup
This commit is contained in:
parent
4244fe1899
commit
3371e500cc
@ -3648,9 +3648,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
|
||||
$scope.leaveChannel = function () {
|
||||
MtpApiManager.invokeApi('channels.leaveChannel', {
|
||||
channel: AppChatsManager.getChannelInput($scope.chatID)
|
||||
}).then(onChatUpdated)
|
||||
return ErrorService.confirm({type: $scope.isMegagroup ? 'MEGAGROUP_LEAVE' : 'CHANNEL_LEAVE'}).then(function () {
|
||||
MtpApiManager.invokeApi('channels.leaveChannel', {
|
||||
channel: AppChatsManager.getChannelInput($scope.chatID)
|
||||
}).then(onChatUpdated)
|
||||
})
|
||||
}
|
||||
|
||||
$scope.deleteChannel = function () {
|
||||
|
@ -216,6 +216,8 @@
|
||||
"confirm_modal_update_reload": "A new version of Telegram Web has been downloaded. Launch it?",
|
||||
"confirm_modal_history_flush": "Are you sure? This can not be undone!",
|
||||
"confirm_modal_history_leave_flush_md": "Are you sure, you want to delete all message history and leave the group?\n\nThis action cannot be undone.",
|
||||
"confirm_modal_leave_channel_md": "Are you sure, you want to leave this channel?\n\nThis action cannot be undone.",
|
||||
"confirm_modal_leave_group_md": "Are you sure, you want to leave this group?\n\nThis action cannot be undone.",
|
||||
"confirm_modal_terminate_sessions": "Are you sure you want to log out all devices except for this one?",
|
||||
"confirm_modal_terminate_session": "Are you sure you want to log out this device?",
|
||||
"confirm_modal_clipboard_file_send": "Are you sure to send file(s) from clipboard?",
|
||||
|
@ -61,6 +61,8 @@
|
||||
<div ng-switch-when="REVOKE_CHANNEL_INVITE_LINK" my-i18n="confirm_modal_revoke_channel_link"></div>
|
||||
<div ng-switch-when="CHANNEL_DELETE" my-i18n="confirm_modal_delete_channel_md"></div>
|
||||
<div ng-switch-when="MEGAGROUP_DELETE" my-i18n="confirm_modal_delete_group_md"></div>
|
||||
<div ng-switch-when="CHANNEL_LEAVE" my-i18n="confirm_modal_leave_channel_md"></div>
|
||||
<div ng-switch-when="MEGAGROUP_LEAVE" my-i18n="confirm_modal_leave_group_md"></div>
|
||||
<div ng-switch-when="JUMP_EXT_URL" my-i18n="confirm_modal_jump_ext_url_md" class="confirm_modal_extlink_jump">
|
||||
<my-i18n-param name="url"><strong ng-bind="url"></strong></my-i18n-param>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user