mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 18:27:24 +01:00
fixes cache calculation and wrong filetransfer cast
This commit is contained in:
parent
f2c59bf5ad
commit
7a509fb608
3 changed files with 14 additions and 8 deletions
|
|
@ -17,8 +17,13 @@ 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 && (((DownloadFileDto)TransferDto)?.FileExists ?? true);
|
||||
public virtual bool CanBeTransferred => !TransferDto.IsForbidden && (TransferDto is not DownloadFileDto dto || dto.FileExists);
|
||||
public bool IsForbidden => TransferDto.IsForbidden;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Hash;
|
||||
}
|
||||
}
|
||||
|
||||
public class UploadFileTransfer : FileTransfer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue