Exemplo n.º 1
0
        private void ProcessStickers()
        {
            _stickers = true;
            var stickers = _stickersService.GetStickerSets(StickerType.Image);

            Execute.BeginOnUIThread(() =>
            {
                SavedStickers.ReplaceWith(stickers);

                if (_frequentlyUsed.Documents.Count > 0)
                {
                    SavedStickers.Insert(0, _frequentlyUsed);
                }
            });
        }
Exemplo n.º 2
0
        private void ProcessRecentStickers()
        {
            var recent = _stickersService.GetRecentStickers(StickerType.Image);

            Execute.BeginOnUIThread(() =>
            {
                _frequentlyUsed.Documents = new TLVector <TLDocumentBase>(recent);

                if (SavedStickers.Count > 0 && SavedStickers[0].Set.ShortName.Equals("tg/recentlyUsed"))
                {
                    SavedStickers.RemoveAt(0);
                }

                if (_frequentlyUsed.Documents.Count > 0)
                {
                    SavedStickers.Insert(0, _frequentlyUsed);
                }
            });
        }