Skip to content

Correctly re-initialize loaders in updates screen.

There used to be a single loader which would get all apps which have updates available. This was restarted when we were notified about new apps requiring updates.

Then, in 7424220c I introduced a second loader responsible for getting apps with known vulnerabilities. This change caused the bug in #1203 (closed), because it changed the loaders from a single loader with ID = 0, to two different loaders with arbitrary IDs. However, there was still a line of code responding to when repo updates completed and we learn about new updateable apps, and this was asking for a loader with an ID of 0 like before. This crashed when the loader was completed and we tried to pase the results.

This is fixed ensuring that both loaders are restarted upon learning of new updateable apps. To prevent this disconnect in the future, they are also extracted into the same method.

Fixes #1203 (closed).

Merge request reports