Optimize performance
Less watch expressions
This commit is contained in:
parent
0bc21d74f7
commit
857181617f
@ -1812,17 +1812,12 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
}
|
||||
|
||||
var userFirstName = false
|
||||
if (isUser) {
|
||||
userFirstName = AppUsersManager.getUser(peerID).first_name
|
||||
}
|
||||
|
||||
ErrorService.confirm({
|
||||
type: 'MESSAGES_DELETE',
|
||||
count: selectedMessageIDs.length,
|
||||
revocable: revocable,
|
||||
isUser: isUser,
|
||||
userFirstName: userFirstName,
|
||||
peerID: peerID,
|
||||
isChannel: isBroadcast,
|
||||
isSupergroup: isMegagroup,
|
||||
isUsualGroup: isUsualGroup
|
||||
|
@ -28,16 +28,16 @@
|
||||
<a class="tg_checkbox" ng-if="revocable" ng-click="data.revoke = !data.revoke" ng-class="data.revoke ? 'tg_checkbox_on' : ''">
|
||||
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
|
||||
<span class="tg_checkbox_label" my-i18n="confirm_modal_message_revoke">
|
||||
<my-i18n-param name="recipient">
|
||||
<span ng-if="isUser" ng-bind="userFirstName"></span>
|
||||
<span ng-if="!isUser" my-i18n="confirm_modal_message_revoke_recipient_group"></span>
|
||||
<my-i18n-param name="recipient" ng-switch="isUser">
|
||||
<span ng-switch-when="true" my-peer-link="peerID" short="true"></span>
|
||||
<span ng-switch-default my-i18n="confirm_modal_message_revoke_recipient_group"></span>
|
||||
</my-i18n-param>
|
||||
</span>
|
||||
</a>
|
||||
<p class="tg_checkbox" ng-if="!revocable && !isChannel">
|
||||
<ng-pluralize ng-if="isUser" count="count" when="confirm_modal_X_messages_non_configurable_for_user_only"></ng-pluralize>
|
||||
<ng-pluralize ng-if="isSupergroup" count="count" when="confirm_modal_X_messages_non_configurable_for_everyone"></ng-pluralize>
|
||||
<ng-pluralize ng-if="isUsualGroup" count="count" when="confirm_modal_X_messages_non_configurable_for_user_only_in_group"></ng-pluralize>
|
||||
<p class="tg_checkbox" ng-if="!revocable && !isChannel" ng-switch="isUser ? 'user' : (isSupergroup ? 'supergroup' : (isUsualGroup ? 'group' : 'default'))">
|
||||
<ng-pluralize ng-switch-when="user" count="count" when="confirm_modal_X_messages_non_configurable_for_user_only"></ng-pluralize>
|
||||
<ng-pluralize ng-switch-when="supergroup" count="count" when="confirm_modal_X_messages_non_configurable_for_everyone"></ng-pluralize>
|
||||
<ng-pluralize ng-switch-when="group" count="count" when="confirm_modal_X_messages_non_configurable_for_user_only_in_group"></ng-pluralize>
|
||||
</p>
|
||||
</span>
|
||||
<span ng-switch-when="PHOTO_DELETE" my-i18n="confirm_modal_photo_delete"></span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user