Bump framework version and small cleanup

pull/37/head
Alexey Golub 7 years ago
parent bb2b04d2e5
commit f7ef3bbb44

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net45</TargetFramework>
<TargetFramework>net461</TargetFramework>
<Version>2.3</Version>
<Company>Tyrrrz</Company>
<Copyright>Copyright (c) 2017-2018 Alexey Golub</Copyright>

@ -33,7 +33,7 @@ namespace DiscordChatExporter.Cli.ViewModels
// Generate file path if not set
if (filePath.IsBlank())
{
filePath = $"{guild} - {channel}.{format.GetFileExtension()}"
filePath = $"{guild.Name} - {channel.Name}.{format.GetFileExtension()}"
.Replace(Path.GetInvalidFileNameChars(), '_');
}

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>

@ -1,4 +1,5 @@
using Tyrrrz.Extensions;
using System.Globalization;
using Tyrrrz.Extensions;
namespace DiscordChatExporter.Core.Models
{
@ -14,9 +15,11 @@ namespace DiscordChatExporter.Core.Models
public string AvatarHash { get; }
public string DefaultAvatarHash => (Discriminator % 5).ToString(CultureInfo.InvariantCulture);
public string AvatarUrl => AvatarHash.IsNotBlank()
? $"https://cdn.discordapp.com/avatars/{Id}/{AvatarHash}.png"
: $"https://cdn.discordapp.com/embed/avatars/{Discriminator % 5}.png";
: $"https://cdn.discordapp.com/embed/avatars/{DefaultAvatarHash}.png";
public User(string id, int discriminator, string name, string avatarHash)
{

@ -81,7 +81,7 @@ namespace DiscordChatExporter.Gui.ViewModels
Guild = m.Guild;
Channel = m.Channel;
SelectedFormat = _settingsService.LastExportFormat;
FilePath = $"{Guild} - {Channel}.{SelectedFormat.GetFileExtension()}"
FilePath = $"{Guild.Name} - {Channel.Name}.{SelectedFormat.GetFileExtension()}"
.Replace(Path.GetInvalidFileNameChars(), '_');
From = null;
To = null;

Loading…
Cancel
Save