Exemplo n.º 1
0
        protected virtual async void SaveExecute()
        {
            var value = GetTLObjectFromSelectedGalleryItem();

            if (value is TLPhoto photo && photo.Full is TLPhotoSize photoSize)
            {
                await TLFileHelper.SavePhotoAsync(photoSize, photo.Date, false);
            }
Exemplo n.º 2
0
        private async void MessageSaveExecute(TLMessageBase messageBase)
        {
            var photo = messageBase.GetPhoto();

            if (photo?.Full is TLPhotoSize photoSize)
            {
                await TLFileHelper.SavePhotoAsync(photoSize, messageBase.Date, false);
            }

            var document = messageBase.GetDocument();

            if (document != null)
            {
                await TLFileHelper.SaveDocumentAsync(document, messageBase.Date, false);
            }
        }