Recheck for partially downloaded files.
This commit is contained in:
parent
b876d90964
commit
8bba8538d5
@ -1,8 +1,11 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Media;
|
||||
using DataLayer;
|
||||
using LibationAvalonia.ViewModels;
|
||||
using LibationUiBase.GridView;
|
||||
using NPOI.HSSF.Record.PivotTable;
|
||||
using System;
|
||||
|
||||
namespace LibationAvalonia.Views
|
||||
@ -45,6 +48,16 @@ namespace LibationAvalonia.Views
|
||||
PdfStatus = null;
|
||||
IsSeries = true;
|
||||
}
|
||||
|
||||
DataContextChanged += LiberateStatusButton_DataContextChanged;
|
||||
}
|
||||
|
||||
private void LiberateStatusButton_DataContextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//Force book status recheck when an entry is scrolled into view.
|
||||
//This will force a recheck for a paprtially downloaded file.
|
||||
var status = DataContext as ILibraryBookEntry;
|
||||
status?.Liberate.Invalidate(nameof(status.Liberate.BookStatus));
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e) => Click?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user