forked from Qortal/qortal
Add "percentLoaded" to resource statuses.
This commit is contained in:
parent
a83e332c11
commit
073d124aef
@ -34,6 +34,7 @@ public class ArbitraryResourceStatus {
|
||||
|
||||
private Integer localChunkCount;
|
||||
private Integer totalChunkCount;
|
||||
private Float percentLoaded;
|
||||
|
||||
public ArbitraryResourceStatus() {
|
||||
}
|
||||
@ -45,6 +46,7 @@ public class ArbitraryResourceStatus {
|
||||
this.description = status.description;
|
||||
this.localChunkCount = localChunkCount;
|
||||
this.totalChunkCount = totalChunkCount;
|
||||
this.percentLoaded = (this.localChunkCount != null && this.totalChunkCount != null) ? this.localChunkCount / (float)this.totalChunkCount * 100.0f : null;
|
||||
}
|
||||
|
||||
public ArbitraryResourceStatus(Status status) {
|
||||
|
Loading…
Reference in New Issue
Block a user