use provided API vom server

This commit is contained in:
Stanley Dimant
2022-07-04 13:16:43 +02:00
parent f0531035fc
commit 90ec056a11
5 changed files with 49 additions and 60 deletions

View File

@@ -17,7 +17,7 @@ public abstract class FileTransfer
public string Hash => TransferDto.Hash;
public bool IsInTransfer => Transferred != Total && Transferred > 0;
public bool IsTransferred => Transferred == Total;
public virtual bool CanBeTransferred => !TransferDto.IsForbidden;
public virtual bool CanBeTransferred => !TransferDto.IsForbidden && (((DownloadFileDto)TransferDto)?.FileExists ?? true);
public bool IsForbidden => TransferDto.IsForbidden;
}