Skip to content

Commit

Permalink
Merge pull request #3548 from sujithsojan/release-7.0.0_ef
Browse files Browse the repository at this point in the history
Issue #ED-3420 fix: Not able to consume Downloaded contents in offline
  • Loading branch information
swayangjit authored Feb 20, 2024
2 parents 3b4034b + 85918a2 commit 0a1a06d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
15 changes: 9 additions & 6 deletions src/app/collection-detail-etb/collection-detail-etb.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class CollectionDetailEtbPage implements OnInit {
this.headerService.updatePageConfig(this.headerConfig);
this.hiddenGroups.clear();
this.shownGroups = undefined;
await this.getFrameworkCategory()
await this.getFrameworkCategory();
await this.assignCardData();
this.resetVariables();
await this.setContentDetails(this.identifier, true);
Expand Down Expand Up @@ -1579,10 +1579,13 @@ export class CollectionDetailEtbPage implements OnInit {
}

async getFrameworkCategory() {
await this.formAndFrameworkUtilService.invokedGetFrameworkCategoryList(this.profile.syllabus[0]).then((categories) => {
if (categories) {
this.categories = categories.sort((a, b) => b.index - a.index)
}
});
this.categories = this.appGlobalService.getCachedFrameworkCategory().value;
if (!this.categories && this.commonUtilService.networkInfo.isNetworkAvailable) {
await this.formAndFrameworkUtilService.invokedGetFrameworkCategoryList(this.profile.syllabus[0]).then((categories) => {
if (categories) {
this.categories = categories.sort((a, b) => b.index - a.index)
}
});
}
}
}
9 changes: 6 additions & 3 deletions src/app/content-details/content-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,8 +1759,11 @@ export class ContentDetailsPage implements OnInit, OnDestroy {


async getContentCategories(frameworkId) {
await this.formFrameworkUtilService.invokedGetFrameworkCategoryList(frameworkId).then((data) => {
this.contentCategories = data;
});
this.contentCategories = this.appGlobalService.getCachedFrameworkCategory().value;
if(!this.contentCategories && this.commonUtilService.networkInfo.isNetworkAvailable) {
await this.formFrameworkUtilService.invokedGetFrameworkCategoryList(frameworkId).then((data) => {
this.contentCategories = data;
});
}
}
}

0 comments on commit 0a1a06d

Please sign in to comment.