show percentage of fetched results

This commit is contained in:
Zlatin Balevsky
2019-10-21 18:28:37 +01:00
parent 265cd6ee15
commit 66bd249ed3
5 changed files with 9 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ class BrowseManager {
int results = Integer.parseInt(headers['Count'])
// at this stage, start pulling the results
eventBus.publish(new BrowseStatusEvent(status : BrowseStatus.FETCHING))
eventBus.publish(new BrowseStatusEvent(status : BrowseStatus.FETCHING, totalResults : results))
JsonSlurper slurper = new JsonSlurper()
DataInputStream dis = new DataInputStream(new GZIPInputStream(is))

View File

@@ -4,4 +4,5 @@ import com.muwire.core.Event
class BrowseStatusEvent extends Event {
BrowseStatus status
int totalResults
}