New attachment templates that support saving and opening attachment when composing message.

This commit is contained in:
Burak Kaan Köse
2024-11-27 19:49:10 +01:00
parent e586145f50
commit 96c98a6987
12 changed files with 196 additions and 62 deletions

View File

@@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Microsoft.Toolkit.Uwp.Helpers;
using Wino.Core.Domain.Models.Common;
namespace Wino.Core.UWP.Extensions
{
public static class StorageFileExtensions
{
public static async Task<SharedFile> ToSharedFileAsync(this Windows.Storage.StorageFile storageFile)
{
var content = await storageFile.ReadBytesAsync();
return new SharedFile(storageFile.Path, content);
}
}
}