Skip to content

Commit

Permalink
Merge pull request #725 from INCENDE/feature/navigation-based-on-hist…
Browse files Browse the repository at this point in the history
…ory-for-sub-tabs

Feature: navigation based on history for sub tabs
  • Loading branch information
sphinxrave authored Sep 23, 2023
2 parents 33dae8f + bbe0ad4 commit acf3896
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/views/HomeFave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,15 @@ export default {
console.log("Activated, so adding refresh timer to HomeFav");
this.changeTab(true);
this.setAutoRefresh();
window.onpopstate = () => { this.init(); };
},
deactivated() {
if (this.refreshTimer) {
console.log("Navigating away, so deleting the refresh timer in HomeFav");
clearInterval(this.refreshTimer);
this.refreshTimer = null;
}
window.onpopstate = () => { };
},
beforeDestroy() {
console.log("Destroying, so deleting the refresh timer in HomeFav");
Expand Down Expand Up @@ -212,7 +214,7 @@ export default {
3: "list",
};
this.$router
.replace({
.push({
// set page to 0 if on scroll mode
query: preservePage && {
...this.$route.query,
Expand Down

0 comments on commit acf3896

Please sign in to comment.