public async void UpdateSupergroupFullInfo(Chat chat, Supergroup group, SupergroupFullInfo fullInfo) { SavedStickers.Remove(_groupSet); var refresh = true; var appData = ApplicationData.Current.LocalSettings.CreateContainer("Channels", ApplicationDataCreateDisposition.Always); if (appData.Values.TryGetValue("Stickers" + group.Id, out object stickersObj)) { var stickersId = (long)stickersObj; if (stickersId == fullInfo.StickerSetId) { refresh = false; } } if (fullInfo.StickerSetId != 0 && refresh) { if (fullInfo.StickerSetId == _groupSet.Id && chat.Id == _groupSet.ChatId) { SavedStickers.Add(_groupSet); return; } var response = await ProtoService.SendAsync(new GetStickerSet(fullInfo.StickerSetId)); if (response is StickerSet stickerSet) { BeginOnUIThread(() => { _groupSet.Update(chat.Id, stickerSet); if (_groupSet.Stickers != null && _groupSet.Stickers.Count > 0) { SavedStickers.Add(_groupSet); } else { SavedStickers.Remove(_groupSet); } }); } } }
private void ProcessFavedStickers() { var items = _stickersService.GetRecentStickers(StickerType.Fave); Execute.BeginOnUIThread(() => { _favedSet.Documents = new TLVector <TLDocumentBase>(items); CheckDocuments(); if (_favedSet.Documents.Count > 0) { SavedStickers.Add(_favedSet); } else { SavedStickers.Remove(_favedSet); } }); }