Generate group invite link
Click on preloaded sticker in history
Scrollbar in Firefox
This commit is contained in:
Igor Zhukov 2015-10-14 00:26:38 +02:00
parent 364d43c33b
commit 6cba0c5ff7
4 changed files with 20 additions and 16 deletions

View File

@ -2008,12 +2008,23 @@ angular.module('myApp.directives', ['myApp.filters'])
};
function link ($scope, element, attrs) {
var imgElement = $('<img />')
.appendTo(element)
.addClass(attrs.imgClass);
var imgElement = $('<img />').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);
});
}
}
})

View File

@ -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;

View File

@ -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;

View File

@ -18,7 +18,7 @@
<div class="im_dialogs_wrap nano">
<div class="im_dialogs_scrollable_wrap nano-content">
<div class="im_dialogs_empty_wrap" ng-if="isEmpty.contacts">
<div class="im_dialogs_empty_wrap" ng-if="isEmpty.dialogs && isEmpty.contacts">
<h3 class="im_dialogs_empty_header" my-i18n="im_no_contacts"></h3>
<p class="im_dialogs_empty_lead" my-i18n="im_get_started_long"></p>
<button type="button" class="btn btn-primary btn-sm" ng-click="importContact()" my-i18n="im_add_contact"></button>