beamer icon indicating copy to clipboard operation
beamer copied to clipboard

Add functionality to refresh the navigator when route state is changed or some other overriding feature

Open bambinoua opened this issue 2 years ago • 2 comments

Sometimes it is necessary to refresh the current route which has the same location (see issue #512). I tried your suggestion but it did not work for me because method _runGuards returns true for a BeamGuard which returns a specific BeamLocation and method update exits before it calls notifyListeners.

I investigated the method apply of BeamGuad and it always returns true if

if( redirectionBeamLocation.state.routeInformaiton.location 
  != target.state.routeInformation.location) {
  return true;
}

It would be good if this condition also included routeInformation.state check. Or maybe some parameter of BeamGuard with signature bool Function(context,origin,target) which can be used in above mentioned condition.

bambinoua avatar May 06 '22 13:05 bambinoua

@bambinoua Indeed, it should also check RouteInformation.state

slovnicki avatar May 08 '22 10:05 slovnicki

We have a problem with including a state check because you cannot really define the state if using BeamGuard.beamToNamed. This will be reworked as a part of v2 which will focus on guards.

slovnicki avatar Jun 10 '22 03:06 slovnicki