Browse Source

Bugfixes

master
Igor Zhukov 8 years ago
parent
commit
85aa4cb7a6
  1. 3
      app/js/controllers.js
  2. 10
      app/js/directives.js
  3. 2
      app/partials/desktop/message.html
  4. 2
      app/partials/desktop/stickerset_modal.html

3
app/js/controllers.js

@ -4790,12 +4790,15 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -4790,12 +4790,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.documents = result.documents;
$scope.stickerEmojis = {};
$scope.stickerDimensions = {};
angular.forEach($scope.documents, function (doc) {
$scope.stickerEmojis[doc.id] = RichTextProcessor.wrapRichText(doc.stickerEmojiRaw, {
noLinks: true,
noLinebreaks: true,
emojiIconSize: 26
});
var dim = calcImageInBox(doc.w, doc.h, 192, 192);
$scope.stickerDimensions[doc.id] = {width: dim.w, height: dim.h};
});
});

10
app/js/directives.js

@ -2107,6 +2107,8 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -2107,6 +2107,8 @@ angular.module('myApp.directives', ['myApp.filters'])
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) {
element
.addClass('clickable')
@ -2124,12 +2126,12 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -2124,12 +2126,12 @@ angular.module('myApp.directives', ['myApp.filters'])
};
imgElement.css({
width: $scope.document.thumb.width,
height: $scope.document.thumb.height
width: dim.width,
height: dim.height
});
element.css({
width: $scope.document.thumb.width,
height: $scope.document.thumb.height
width: dim.width,
height: dim.height
});
var smallLocation = false;

2
app/partials/desktop/message.html

@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' &amp;&amp; historyMessage.media ? true : false}">
<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">&nbsp;</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">&nbsp;</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>

2
app/partials/desktop/stickerset_modal.html

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<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)">
<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>
</a>
</div>

Loading…
Cancel
Save