Browse Source

Handle all variants of hearts as the same

master
Eduard Kuzmenko 3 years ago
parent
commit
edf5553692
  1. 8
      src/lib/appManagers/appStickersManager.ts

8
src/lib/appManagers/appStickersManager.ts

@ -50,7 +50,7 @@ export class AppStickersManager { @@ -50,7 +50,7 @@ export class AppStickersManager {
private getGreetingStickersPromise: Promise<void>;
private sounds: Record<string, MyDocument>;
getAnimatedEmojiSoundsPromise: Promise<void>;
private getAnimatedEmojiSoundsPromise: Promise<void>;
constructor() {
this.getStickerSetPromises = {};
@ -231,6 +231,12 @@ export class AppStickersManager { @@ -231,6 +231,12 @@ export class AppStickersManager {
const stickerSet = this.storage.getFromCache(isAnimation ? EMOJI_ANIMATIONS_SET_LOCAL_ID : EMOJI_SET_LOCAL_ID);
if(!stickerSet || !stickerSet.documents) return undefined;
if(isAnimation) {
if(['🧡', '💛', '💚', '💙', '💜', '🖤', '🤍', '🤎'].includes(emoji)) {
emoji = '❤';
}
}
emoji = this.cleanEmoji(emoji);
const pack = stickerSet.packs.find(p => p.emoticon === emoji);
return pack ? appDocsManager.getDoc(pack.documents[0]) : undefined;

Loading…
Cancel
Save