Bugfixes
This commit is contained in:
parent
cc7493e3d3
commit
85aa4cb7a6
@ -4790,12 +4790,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
$scope.documents = result.documents;
|
$scope.documents = result.documents;
|
||||||
|
|
||||||
$scope.stickerEmojis = {};
|
$scope.stickerEmojis = {};
|
||||||
|
$scope.stickerDimensions = {};
|
||||||
angular.forEach($scope.documents, function (doc) {
|
angular.forEach($scope.documents, function (doc) {
|
||||||
$scope.stickerEmojis[doc.id] = RichTextProcessor.wrapRichText(doc.stickerEmojiRaw, {
|
$scope.stickerEmojis[doc.id] = RichTextProcessor.wrapRichText(doc.stickerEmojiRaw, {
|
||||||
noLinks: true,
|
noLinks: true,
|
||||||
noLinebreaks: true,
|
noLinebreaks: true,
|
||||||
emojiIconSize: 26
|
emojiIconSize: 26
|
||||||
});
|
});
|
||||||
|
var dim = calcImageInBox(doc.w, doc.h, 192, 192);
|
||||||
|
$scope.stickerDimensions[doc.id] = {width: dim.w, height: dim.h};
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -2107,6 +2107,8 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
|
|
||||||
imgElement.attr('alt', '['+ ($scope.document.stickerEmojiRaw || '') + ' ' + _('conversation_media_sticker') +']');
|
imgElement.attr('alt', '['+ ($scope.document.stickerEmojiRaw || '') + ' ' + _('conversation_media_sticker') +']');
|
||||||
|
|
||||||
|
var dim = attrs.dim && $scope.$parent.$eval(attrs.dim) || $scope.document.thumb;
|
||||||
|
|
||||||
if (attrs.open && $scope.document.stickerSetInput) {
|
if (attrs.open && $scope.document.stickerSetInput) {
|
||||||
element
|
element
|
||||||
.addClass('clickable')
|
.addClass('clickable')
|
||||||
@ -2124,12 +2126,12 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
};
|
};
|
||||||
|
|
||||||
imgElement.css({
|
imgElement.css({
|
||||||
width: $scope.document.thumb.width,
|
width: dim.width,
|
||||||
height: $scope.document.thumb.height
|
height: dim.height
|
||||||
});
|
});
|
||||||
element.css({
|
element.css({
|
||||||
width: $scope.document.thumb.width,
|
width: dim.width,
|
||||||
height: $scope.document.thumb.height
|
height: dim.height
|
||||||
});
|
});
|
||||||
|
|
||||||
var smallLocation = false;
|
var smallLocation = false;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' && historyMessage.media ? true : false}">
|
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' && historyMessage.media ? true : false}">
|
||||||
|
|
||||||
<span class="im_message_author_wrap">
|
<span class="im_message_author_wrap">
|
||||||
<span class="copyonly">[<span ng-bind="::historyMessage.date | time"></span>] </span><a class="im_message_author" my-peer-link="historyMessage.fromID" short="historyMessage.toID > 0" color="historyMessage.toID < 0" no-watch="true"></a><a ng-if="::historyMessage.viaBotID && !historyMessage.fwdFromID" class="im_message_author_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly"> </span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span><span class="copyonly">:</span></a>
|
<span class="copyonly">[<span ng-bind="::historyMessage.date | time"></span>] </span><a class="im_message_author" my-peer-link="historyMessage.fromID" short="historyMessage.toID > 0" color="historyMessage.toID < 0" no-watch="true"></a><a ng-if="::historyMessage.viaBotID && !historyMessage.fwdFromID" class="im_message_author_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly"> </span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span></a><span class="copyonly">:</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<div ng-switch-default class="stickerset_modal_stickers_list clearfix">
|
<div ng-switch-default class="stickerset_modal_stickers_list clearfix">
|
||||||
<a class="stickerset_modal_sticker_wrap" ng-repeat="sticker in documents | limitTo: slice.limit" ng-click="chooseSticker(sticker.id)">
|
<a class="stickerset_modal_sticker_wrap" ng-repeat="sticker in documents | limitTo: slice.limit" ng-click="chooseSticker(sticker.id)">
|
||||||
<div class="stickerset_modal_sticker" my-load-sticker document="sticker"></div>
|
<div class="stickerset_modal_sticker" my-load-sticker document="sticker" dim="stickerDimensions[sticker.id]"></div>
|
||||||
<div class="stickerset_modal_sticker_alt" ng-bind-html="stickerEmojis[sticker.id]"></div>
|
<div class="stickerset_modal_sticker_alt" ng-bind-html="stickerEmojis[sticker.id]"></div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user