Merge pull request #1988 from marxjohnson/MOBILE-3054_integration
MOBILE-3054 Courses: Update section download icon
This commit is contained in:
		
						commit
						d9c85a8b9e
					
				| @ -479,6 +479,14 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|         this.dynamicComponents.forEach((component) => { |         this.dynamicComponents.forEach((component) => { | ||||||
|             component.callComponentFunction('ionViewDidEnter'); |             component.callComponentFunction('ionViewDidEnter'); | ||||||
|         }); |         }); | ||||||
|  |         if (this.downloadEnabled) { | ||||||
|  |             // The download status of a section might have been changed from within a module page.
 | ||||||
|  |             if (this.selectedSection && this.selectedSection.id !== CoreCourseProvider.ALL_SECTIONS_ID) { | ||||||
|  |                 this.courseHelper.calculateSectionStatus(this.selectedSection, this.course.id); | ||||||
|  |             } else { | ||||||
|  |                 this.courseHelper.calculateSectionsStatus(this.sections, this.course.id); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -148,6 +148,8 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { | |||||||
|         // Get download size to ask for confirm if it's high.
 |         // Get download size to ask for confirm if it's high.
 | ||||||
|         this.prefetchHandler.getDownloadSize(this.module, this.courseId, true).then((size) => { |         this.prefetchHandler.getDownloadSize(this.module, this.courseId, true).then((size) => { | ||||||
|             return this.courseHelper.prefetchModule(this.prefetchHandler, this.module, size, this.courseId, refresh); |             return this.courseHelper.prefetchModule(this.prefetchHandler, this.module, size, this.courseId, refresh); | ||||||
|  |         }).then(() => { | ||||||
|  |             this.courseHelper.calculateSectionStatus(this.section, this.courseId); | ||||||
|         }).catch((error) => { |         }).catch((error) => { | ||||||
|             // Error, hide spinner.
 |             // Error, hide spinner.
 | ||||||
|             this.spinner = false; |             this.spinner = false; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user