Wire up file size

This commit is contained in:
TheXamlGuy
2024-07-24 22:21:27 +01:00
parent 0c067ea133
commit 6779ac042b
3 changed files with 7 additions and 6 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
<SettingsExpanderItem <SettingsExpanderItem
x:Class="Wallet.Avalonia.AttachmentEntryView" x:Class="Wallet.Avalonia.AttachmentEntryView"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Welcome to Avalonia! xmlns:vm="using:Wallet"
</SettingsExpanderItem> x:DataType="vm:LocalAttachmentEntryViewModel"
Description="{Binding Size, Converter={FileSizeNameConverter}}" />
+1 -1
View File
@@ -31,7 +31,7 @@ public partial class AttachmentEntryCollectionViewModel(IServiceProvider provide
string path = file.Path; string path = file.Path;
DateTimeOffset created = DateTimeOffset.Now; DateTimeOffset created = DateTimeOffset.Now;
string name = file.Name; string name = file.Name;
int size = file.Size; long size = file.Size;
Attachment attachment = new() Attachment attachment = new()
{ {
+2 -2
View File
@@ -11,7 +11,7 @@ public partial class LocalAttachmentEntryViewModel(IServiceProvider provider,
IDisposer disposer, IDisposer disposer,
string path, string path,
DateTimeOffset created, DateTimeOffset created,
int size, long size,
string name) : Observable(provider, factory, mediator, publisher, subscriber, disposer), string name) : Observable(provider, factory, mediator, publisher, subscriber, disposer),
IAttachmentEntryViewModel IAttachmentEntryViewModel
{ {
@@ -22,7 +22,7 @@ public partial class LocalAttachmentEntryViewModel(IServiceProvider provider,
private string path = path; private string path = path;
[ObservableProperty] [ObservableProperty]
private int size = size; private long size = size;
[ObservableProperty] [ObservableProperty]
private string name = name; private string name = name;