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
x:Class="Wallet.Avalonia.AttachmentEntryView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Welcome to Avalonia!
</SettingsExpanderItem>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Wallet"
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;
DateTimeOffset created = DateTimeOffset.Now;
string name = file.Name;
int size = file.Size;
long size = file.Size;
Attachment attachment = new()
{
+2 -2
View File
@@ -11,7 +11,7 @@ public partial class LocalAttachmentEntryViewModel(IServiceProvider provider,
IDisposer disposer,
string path,
DateTimeOffset created,
int size,
long size,
string name) : Observable(provider, factory, mediator, publisher, subscriber, disposer),
IAttachmentEntryViewModel
{
@@ -22,7 +22,7 @@ public partial class LocalAttachmentEntryViewModel(IServiceProvider provider,
private string path = path;
[ObservableProperty]
private int size = size;
private long size = size;
[ObservableProperty]
private string name = name;