Browse Source

No revoke label when deleting saved message

master
Igor Zhukov 7 years ago
parent
commit
6936ca11c3
  1. 2
      app/js/controllers.js
  2. 2
      app/partials/desktop/confirm_modal.html

2
app/js/controllers.js

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

2
app/partials/desktop/confirm_modal.html

@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
</my-i18n-param>
</span>
</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="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>

Loading…
Cancel
Save