forked from EVOgeek/Vmeda.Online
		
	MOBILE-4377 sitehome: Show site home if has course blocks
This commit is contained in:
		
							parent
							
								
									24c1b38da5
								
							
						
					
					
						commit
						8961086c8e
					
				| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user