Get rid of ByteSize in favor of our own class

This commit is contained in:
Alexey Golub
2019-03-24 12:36:11 +02:00
parent cac48b3541
commit 4113101c0c
5 changed files with 87 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
using System;
using System.Drawing;
using System.Linq;
using ByteSizeLib;
using DiscordChatExporter.Core.Internal;
using DiscordChatExporter.Core.Models;
using Newtonsoft.Json.Linq;
@@ -72,7 +71,7 @@ namespace DiscordChatExporter.Core.Services
var fileName = json["filename"].Value<string>();
var fileSizeBytes = json["size"].Value<long>();
var fileSize = ByteSize.FromBytes(fileSizeBytes);
var fileSize = new FileSize(fileSizeBytes);
return new Attachment(id, width, height, url, fileName, fileSize);
}