diff --git a/src/components/popups/stickers.ts b/src/components/popups/stickers.ts index 3f868c08..9fcb8219 100644 --- a/src/components/popups/stickers.ts +++ b/src/components/popups/stickers.ts @@ -20,6 +20,7 @@ import Button from "../button"; import findUpClassName from "../../helpers/dom/findUpClassName"; import toggleDisability from "../../helpers/dom/toggleDisability"; import { attachClickEvent } from "../../helpers/dom/clickEvent"; +import { toastNew } from "../toast"; const ANIMATION_GROUP = 'STICKERS-POPUP'; @@ -86,6 +87,11 @@ export default class PopupStickers extends PopupElement { private loadStickerSet() { return appStickersManager.getStickerSet(this.stickerSetInput).then(set => { + if(!set) { + toastNew({langPackKey: 'StickerSet.DontExist'}); + this.hide(); + return; + } //console.log('PopupStickers loadStickerSet got set:', set); this.set = set.set; diff --git a/src/lang.ts b/src/lang.ts index 5f9dd69f..589d6f4b 100644 --- a/src/lang.ts +++ b/src/lang.ts @@ -975,6 +975,7 @@ const lang = { "Schedule.SendWhenOnline": "Send When Online", "Stickers.Recent": "Recent", //"Stickers.Favorite": "Favorite", + "StickerSet.DontExist": "Sorry, this sticker set doesn't seem to exist.", "VoiceChat.Chat.StartNew": "Video chat ended. Start a new one?", "VoiceChat.Chat.StartNew.OK": "Start", "VoiceChat.Chat.Ended": "Video chat ended.",