MOBILE-2843 course: Improve show prefetch group of courses

main
Pau Ferrer Ocaña 2019-01-22 11:52:07 +01:00
parent fe25e65039
commit 4aa5d4a6a1
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ ion-app.app-root core-empty-box {
.icon {
font-size: 120px;
width: auto;
}
img {
height: 125px;

View File

@ -758,10 +758,11 @@ export class CoreCourseHelperProvider {
*
* @param {any[]} courses Courses array to get info from.
* @param {any} prefetch Prefetch information.
* @param {number} [minCourses=2] Min course to show icon.
* @return {Promise<any>} Resolved with the prefetch information updated when done.
*/
initPrefetchCoursesIcons(courses: any[], prefetch: any): Promise<any> {
if (!courses || courses.length < 2) {
initPrefetchCoursesIcons(courses: any[], prefetch: any, minCourses: number = 2): Promise<any> {
if (!courses || courses.length < minCourses) {
// Not enough courses.
prefetch.icon = '';