fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

client: Reload entries by clicking on active menu item #1300

Closed jtojnar closed 2 years ago

jtojnar commented 2 years ago

This is quite hacky – router does not re-render the route when clicking on an already active link because its data is based on the document.location. To bypass this, we need to pass an extra value in the location’s state object that will let us know we should reload. And for similar reasons, it cannot just be a boolean (or we would have to clear the state each time to be able to tell when the value changes again) so we are back at increasing counters.

Unfortunately, that is not end of it since any navigation would clear the state, triggering another reload so we also need to use another counter that only increases when the counter in location state increases.

Fixes: https://github.com/fossar/selfoss/issues/1287