Merge pull request #3719 from alfonso-salces/MOBILE-4377
MOBILE-4377 sitehome: Show site home if has course blocksmain
commit
3d5dcb22d8
|
@ -21,6 +21,7 @@ import { CoreCourse } from '../../course/services/course';
|
|||
import { CoreCourses } from '../../courses/services/courses';
|
||||
import { AddonModForum, AddonModForumData } from '@addons/mod/forum/services/forum';
|
||||
import { CoreError } from '@classes/errors/error';
|
||||
import { CoreBlockHelper } from '@features/block/services/block-helper';
|
||||
|
||||
/**
|
||||
* Items with index 1 and 3 were removed on 2.5 and not being supported in the app.
|
||||
|
@ -98,8 +99,9 @@ export class CoreSiteHomeProvider {
|
|||
}
|
||||
|
||||
const hasContent = sections.some((section) => section.summary || (section.modules && section.modules.length));
|
||||
const hasCourseBlocks = await CoreBlockHelper.hasCourseBlocks(siteHomeId);
|
||||
|
||||
if (hasContent) {
|
||||
if (hasContent || hasCourseBlocks) {
|
||||
// There's a section with content.
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue