Fix error introduced with previous commit

The refresh function is not defined in the scope it's called in which
is why the event is necessary. However, unlike the original, the app
scope is used instead of the root scope because there's no need to
dispatch from the root scope here.