Browse Source

Added missing sticker set toast

master
Eduard Kuzmenko 2 years ago
parent
commit
dbecd32d69
  1. 6
      src/components/popups/stickers.ts
  2. 1
      src/lang.ts

6
src/components/popups/stickers.ts

@ -20,6 +20,7 @@ import Button from "../button"; @@ -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 { @@ -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;

1
src/lang.ts

@ -975,6 +975,7 @@ const lang = { @@ -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.",

Loading…
Cancel
Save