No revoke label when deleting saved message

This commit is contained in:
Igor Zhukov 2017-12-31 14:26:57 +04:00
parent 9f30c81e6d
commit 6936ca11c3
2 changed files with 3 additions and 1 deletions

View File

@ -1877,6 +1877,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
var isBroadcast = AppPeersManager.isBroadcast(peerID) var isBroadcast = AppPeersManager.isBroadcast(peerID)
var isMegagroup = AppPeersManager.isMegagroup(peerID) var isMegagroup = AppPeersManager.isMegagroup(peerID)
var isUsualGroup = !isChannel && !isUser var isUsualGroup = !isChannel && !isUser
var isSavedMessages = peerID == AppUsersManager.getSelf().id
var revocable = !isChannel var revocable = !isChannel
for (var i = 0; revocable && i < selectedMessageIDs.length; i++) { for (var i = 0; revocable && i < selectedMessageIDs.length; i++) {
@ -1892,6 +1893,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
revocable: revocable, revocable: revocable,
isUser: isUser, isUser: isUser,
peerID: peerID, peerID: peerID,
isSavedMessages: isSavedMessages,
isChannel: isBroadcast, isChannel: isBroadcast,
isSupergroup: isMegagroup, isSupergroup: isMegagroup,
isUsualGroup: isUsualGroup isUsualGroup: isUsualGroup

View File

@ -35,7 +35,7 @@
</my-i18n-param> </my-i18n-param>
</span> </span>
</a> </a>
<p class="tg_checkbox" ng-if="!revocable && !isChannel" ng-switch="isUser ? 'user' : (isSupergroup ? 'supergroup' : (isUsualGroup ? 'group' : 'default'))"> <p class="tg_checkbox" ng-if="!revocable && !isChannel && !isSavedMessages" ng-switch="isUser ? 'user' : (isSupergroup ? 'supergroup' : (isUsualGroup ? 'group' : 'default'))">
<span ng-switch-when="supergroup" my-i18n="confirm_modal_delete_messages_for_everyone_chat"></span> <span ng-switch-when="supergroup" my-i18n="confirm_modal_delete_messages_for_everyone_chat"></span>
<span ng-switch-when="group" my-i18n="confirm_modal_delete_messages_for_you_only_chat"></span> <span ng-switch-when="group" my-i18n="confirm_modal_delete_messages_for_you_only_chat"></span>
<span ng-switch-when="user" my-i18n="confirm_modal_delete_messages_for_you_only_pm"><my-i18n-param name="user"><strong my-peer-link="peerID"></strong></my-i18n-param></span> <span ng-switch-when="user" my-i18n="confirm_modal_delete_messages_for_you_only_pm"><my-i18n-param name="user"><strong my-peer-link="peerID"></strong></my-i18n-param></span>