Wire up file size
This commit is contained in:
@@ -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}}" />
|
||||||
|
|||||||
@@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user