Skip to content

Commit 0149699

Browse files
authored
Merge pull request #1957 from numbersprotocol/feature-reload-explore-tab-on-click
feat(home.page): refresh explore tab if clicked twice
2 parents cfabe5f + 6e5012e commit 0149699

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

src/app/features/home/home.page.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@
9090
>
9191
<mat-tab>
9292
<ng-template mat-tab-label>
93-
<ion-icon
94-
src="/assets/images/icons/search.svg"
95-
class="tab-action-button-icon"
96-
joyrideStep="highlightHomeTab"
97-
title="Home Tab"
98-
text="View created captures"
99-
></ion-icon>
93+
<button mat-icon-button (click)="navigateToExploreTab()">
94+
<ion-icon
95+
src="/assets/images/icons/search.svg"
96+
class="tab-action-button-icon"
97+
joyrideStep="highlightHomeTab"
98+
title="Home Tab"
99+
text="View created captures"
100+
></ion-icon>
101+
</button>
100102
</ng-template>
101103
<app-explore-tab></app-explore-tab>
102104
</mat-tab>

src/app/features/home/home.page.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ export class HomePage {
346346
.subscribe();
347347
}
348348

349+
// eslint-disable-next-line class-methods-use-this
350+
navigateToExploreTab() {
351+
if (this.selectedTabIndex === 0) {
352+
window.location.reload();
353+
}
354+
}
355+
349356
async navigateToInboxTab() {
350357
await this.userGuideService.showUserGuidesOnInboxTab();
351358
await this.userGuideService.setHasOpenedInboxTab(true);

0 commit comments

Comments
 (0)