Improved quick emoji selector
This commit is contained in:
parent
3c3de23640
commit
5548b86b45
@ -662,6 +662,7 @@ a.footer_link.active:active {
|
|||||||
.im_emoji_quick_select_area a {
|
.im_emoji_quick_select_area a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.im_emoji_quick_select_area a:hover {
|
.im_emoji_quick_select_area a:hover {
|
||||||
|
@ -12,7 +12,7 @@ angular.module('izhukov.mtproto', ['izhukov.utils'])
|
|||||||
|
|
||||||
var dcOptions = Config.Modes.test
|
var dcOptions = Config.Modes.test
|
||||||
? [
|
? [
|
||||||
{id: 1, host: '173.240.5.253', port: 80},
|
{id: 1, host: '149.154.175.10', port: 80},
|
||||||
{id: 2, host: '149.154.167.40', port: 80},
|
{id: 2, host: '149.154.167.40', port: 80},
|
||||||
{id: 3, host: '174.140.142.5', port: 80}
|
{id: 3, host: '174.140.142.5', port: 80}
|
||||||
]
|
]
|
||||||
|
@ -2719,7 +2719,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
|
|
||||||
var doc = angular.copy(docs[docID]),
|
var doc = angular.copy(docs[docID]),
|
||||||
isGif = doc.mime_type == 'image/gif',
|
isGif = doc.mime_type == 'image/gif',
|
||||||
isSticker = doc.mime_type == 'image/webp' || doc.mime_type.substr(0, 6) == 'image/' && doc.sticker,
|
isSticker = doc.mime_type.substr(0, 6) == 'image/' && doc.sticker,
|
||||||
thumbPhotoSize = doc.thumb,
|
thumbPhotoSize = doc.thumb,
|
||||||
width, height;
|
width, height;
|
||||||
|
|
||||||
@ -2736,7 +2736,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
location: {
|
location: {
|
||||||
_: 'inputDocumentFileLocation',
|
_: 'inputDocumentFileLocation',
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
access_hash: doc.access_hash
|
access_hash: doc.access_hash,
|
||||||
|
dc_id: doc.dc_id
|
||||||
},
|
},
|
||||||
w: doc.w,
|
w: doc.w,
|
||||||
h: doc.h,
|
h: doc.h,
|
||||||
|
11
app/vendor/jquery.emojiarea/jquery.emojiarea.js
vendored
11
app/vendor/jquery.emojiarea/jquery.emojiarea.js
vendored
@ -206,7 +206,7 @@
|
|||||||
ConfigStorage.set({emojis_recent: curEmojis});
|
ConfigStorage.set({emojis_recent: curEmojis});
|
||||||
|
|
||||||
if (quickSelect) {
|
if (quickSelect) {
|
||||||
quickSelect.load(0);
|
quickSelect.changed = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
@ -709,17 +709,26 @@
|
|||||||
|
|
||||||
var EmojiQuickSelectArea = function(emojiarea, $items) {
|
var EmojiQuickSelectArea = function(emojiarea, $items) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var $body = $(document.body);
|
||||||
|
|
||||||
this.emojiarea = emojiarea;
|
this.emojiarea = emojiarea;
|
||||||
|
this.changed = false;
|
||||||
this.$items = $items;
|
this.$items = $items;
|
||||||
|
|
||||||
this.load(0);
|
this.load(0);
|
||||||
this.$items.on('click', 'a', function(e) {
|
this.$items.on('click', 'a', function(e) {
|
||||||
var emoji = $('.label', $(this)).text();
|
var emoji = $('.label', $(this)).text();
|
||||||
self.onItemSelected(emoji);
|
self.onItemSelected(emoji);
|
||||||
|
self.changed = true;
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$body.on('message_send', function(e) {
|
||||||
|
if (self.changed) {
|
||||||
|
self.load(0);
|
||||||
|
self.changed = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
util.extend(EmojiQuickSelectArea.prototype, EmojiMenu.prototype);
|
util.extend(EmojiQuickSelectArea.prototype, EmojiMenu.prototype);
|
||||||
|
Loading…
Reference in New Issue
Block a user