diff --git a/app/js/directives.js b/app/js/directives.js
index 01707fee..8de7a681 100755
--- a/app/js/directives.js
+++ b/app/js/directives.js
@@ -2008,12 +2008,23 @@ angular.module('myApp.directives', ['myApp.filters'])
};
function link ($scope, element, attrs) {
- var imgElement = $('')
- .appendTo(element)
- .addClass(attrs.imgClass);
+ var imgElement = $('
').addClass(attrs.imgClass);
+ var wasAdded = false;
+
+ if (attrs.open && $scope.document.stickerSetInput) {
+ element
+ .addClass('clickable')
+ .on('click', function () {
+ AppStickersManager.openStickerset($scope.document.stickerSetInput);
+ });
+ }
var setSrc = function (blob) {
imgElement.attr('src', FileManager.getUrl(blob));
+ if (!wasAdded) {
+ wasAdded = true;
+ imgElement.appendTo(element);
+ }
};
imgElement.css({
@@ -2051,7 +2062,8 @@ angular.module('myApp.directives', ['myApp.filters'])
return;
}
} else {
- imgElement.attr('src', emptySrc);
+ wasAdded = true;
+ imgElement.attr('src', emptySrc).appendTo(element);
}
if (attrs.thumb) {
@@ -2067,14 +2079,6 @@ angular.module('myApp.directives', ['myApp.filters'])
console.log('Download sticker failed', e, fullLocation);
});
}
-
- if (attrs.open && $scope.document.stickerSetInput) {
- element
- .addClass('clickable')
- .on('click', function () {
- AppStickersManager.openStickerset($scope.document.stickerSetInput);
- });
- }
}
})
diff --git a/app/js/services.js b/app/js/services.js
index db7bec99..a970a394 100755
--- a/app/js/services.js
+++ b/app/js/services.js
@@ -1024,7 +1024,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return chatFull.exported_invite.link;
}
return MtpApiManager.invokeApi('messages.exportChatInvite', {
- chat_id: getChatInput(id)
+ chat_id: AppChatsManager.getChatInput(id)
}).then(function (exportedInvite) {
if (chatsFull[id] !== undefined) {
chatsFull[id].exported_invite = exportedInvite;
diff --git a/app/less/app.less b/app/less/app.less
index 8b97dc05..c7739d86 100644
--- a/app/less/app.less
+++ b/app/less/app.less
@@ -2467,13 +2467,13 @@ img.img_fullsize {
.composer_emoji_tooltip_tab_emoji_content & {
width: 100%;
margin: 0 0 3px;
- padding: 0 5px;
+ padding: 0 5px 15px;
line-height: 0;
}
.composer_emoji_tooltip_tab_stickers_content & {
vertical-align: top;
- padding: 0 5px;
+ padding: 0 5px 15px;
margin: 0 0 3px;
overflow-x: scroll;
white-space: nowrap;
diff --git a/app/partials/desktop/im.html b/app/partials/desktop/im.html
index c2c8a055..ff0b5c46 100644
--- a/app/partials/desktop/im.html
+++ b/app/partials/desktop/im.html
@@ -18,7 +18,7 @@