Skip to content

Add progress reporting for index-v1 (using `LocalBroadcastManager`)

A reimagination of !548 (closed), using LocalBroadcastManager as suggested. I still think LocalBroadcastManager is a terrible API, but this works fine and reads pretty well.

If it is too messy or too large a change, feel free to merge !548 (closed) and close this. Alternatively, if this is merged, could you please close !548 (closed) in response.

This refactors existing progress handling between RepoUpdater and UpdateService to use LocalBroadcastManager in preference to ProgressListener. Still needs to use ProgressListener to talk between RepoUpdater and the Downloader + ProgressBufferedInputStream.

The only change that is related to something more important than notifications is the fact that now IndexV1Updater makes use of the indexUrl. To do so, because it is final, the base class constructor delegates to getIndexUrl() which is overriden by the v1 updater. This is required because we want to differentiate between broadcasts coming from different repo update processes.

Fixes #1054 (closed).

Edited by username-removed-25042

Merge request reports

Loading