Skip to content

Commit

Permalink
Issue #ED-2783 merge: Merge pull request #3478 from Ajoymaity/releas…
Browse files Browse the repository at this point in the history
…e-6.0.0_v13

 Issue #ED-2783 fix: Fixed multiple issue for profile update navigation, content player back button issue and update profile
  • Loading branch information
swayangjit authored Sep 4, 2023
2 parents e02fbc5 + e0e0071 commit 225abf2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app/content-details/content-details.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ describe('ContentDetailsPage', () => {
mockContentService.getContentDetails = jest.fn(() => of({ contentData: { size: '12KB', status: 'Retired' } }));
mockCommonUtilService.showToast = jest.fn();
mockLocation.back = jest.fn();
contentDetailsPage.navigateBackFlag = false;
jest.spyOn(contentDetailsPage, 'extractApiResponse').mockReturnValue();
jest.spyOn(contentDetailsPage, 'showRetiredContentPopup').mockImplementation(() => {
return Promise.resolve();
Expand Down Expand Up @@ -937,6 +938,7 @@ describe('ContentDetailsPage', () => {
dismiss: dismissFn,
}));
contentDetailsPage.isDownloadStarted = false;
contentDetailsPage.navigateBackFlag = false;
mockLocation.back = jest.fn();
// act
contentDetailsPage.setContentDetails(identifier, refreshContentDetails, showRating);
Expand Down Expand Up @@ -964,6 +966,7 @@ describe('ContentDetailsPage', () => {
dismiss: dismissFn,
}));
contentDetailsPage.isDownloadStarted = true;
contentDetailsPage.navigateBackFlag = false;
mockLocation.back = jest.fn();
// act
contentDetailsPage.setContentDetails(identifier, refreshContentDetails, showRating);
Expand Down Expand Up @@ -991,6 +994,7 @@ describe('ContentDetailsPage', () => {
dismiss: dismissFn,
}));
contentDetailsPage.isDownloadStarted = true;
contentDetailsPage.navigateBackFlag = false;
mockLocation.back = jest.fn();
// act
contentDetailsPage.setContentDetails(identifier, refreshContentDetails, showRating);
Expand Down
6 changes: 5 additions & 1 deletion src/app/content-details/content-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export class ContentDetailsPage implements OnInit, OnDestroy {
nextContentToBePlayed: any;
isPlayerPlaying = false;
showMoreFlag: any = false;
navigateBackFlag = false;
@ViewChild('video') video: ElementRef | undefined;

constructor(
Expand Down Expand Up @@ -537,7 +538,10 @@ export class ContentDetailsPage implements OnInit, OnDestroy {
} else {
this.commonUtilService.showToast('ERROR_CONTENT_NOT_AVAILABLE');
}
this.location.back();
if (!this.navigateBackFlag) {
this.navigateBackFlag = true;
this.location.back();
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/district-mapping/district-mapping.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class DistrictMappingPage implements OnDestroy {
this.location.back();
} else if (this.profile && this.source === PageId.PROFILE) {
this.location.back();
this.events.publish('UPDATE_TABS', {type: 'SWITCH_TABS_USERTYPE'});
// this.events.publish('UPDATE_TABS', {type: 'SWITCH_TABS_USERTYPE'});
} else {
if (this.profile && !isSSOUser) {
await this.appGlobalService.showYearOfBirthPopup(this.profile.serverProfile);
Expand Down

0 comments on commit 225abf2

Please sign in to comment.