Merge pull request #2801 from dpalou/MOBILE-3320

Mobile 3320
main
Pau Ferrer Ocaña 2021-06-01 10:05:04 +02:00 committed by GitHub
commit 7b097320cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 11 deletions

View File

@ -33,7 +33,7 @@
<!-- List of files. -->
<ion-list *ngIf="files && files.length > 0">
<ng-container *ngFor="let file of files">
<ion-item button *ngIf="file.isdir" class="item-file" (click)="openFolder(file)">
<ion-item button *ngIf="file.isdir" class="item-file" (click)="openFolder(file)" detail="true">
<ion-thumbnail slot="start">
<img [src]="file.imgPath" alt="" role="presentation">
</ion-thumbnail>

View File

@ -127,10 +127,6 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
this.showCompletion ? CoreCourse.invalidateModule(this.module.id) : undefined,
]));
if (this.showCompletion) {
this.module = await CoreCourse.getModule(this.module.id, this.courseId);
}
await this.loadContent(true, sync, showErrors);
} finally {
this.refreshIcon = CoreConstants.ICON_REFRESH;
@ -205,6 +201,14 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
}
try {
if (refresh && this.showCompletion) {
try {
this.module = await CoreCourse.getModule(this.module.id, this.courseId);
} catch {
// Ignore errors.
}
}
await this.fetchContent(refresh, sync, showErrors);
} catch (error) {
if (!refresh) {

View File

@ -58,7 +58,7 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
return {
title: 'core.fileuploader.photoalbums',
class: 'core-fileuploader-album-handler',
icon: 'images',
icon: 'images', // Cannot use font-awesome in action sheet.
action: async (
maxSize?: number,
upload?: boolean,

View File

@ -73,7 +73,7 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
return {
title: 'core.fileuploader.audio',
class: 'core-fileuploader-audio-handler',
icon: 'mic',
icon: 'mic', // Cannot use font-awesome in action sheet.
action: async (
maxSize?: number,
upload?: boolean,

View File

@ -58,7 +58,7 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
return {
title: 'core.fileuploader.camera',
class: 'core-fileuploader-camera-handler',
icon: 'camera',
icon: 'camera', // Cannot use font-awesome in action sheet.
action: async (
maxSize?: number,
upload?: boolean,

View File

@ -58,7 +58,7 @@ export class CoreFileUploaderFileHandlerService implements CoreFileUploaderHandl
const handler: CoreFileUploaderHandlerData = {
title: 'core.fileuploader.file',
class: 'core-fileuploader-file-handler',
icon: 'folder',
icon: 'folder', // Cannot use font-awesome in action sheet.
};
if (CoreApp.isMobile()) {

View File

@ -73,7 +73,7 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
return {
title: 'core.fileuploader.video',
class: 'core-fileuploader-video-handler',
icon: 'videocam',
icon: 'videocam', // Cannot use font-awesome in action sheet.
action: async (
maxSize?: number,
upload?: boolean,

View File

@ -59,7 +59,7 @@ export class CoreSharedFilesUploadHandlerService implements CoreFileUploaderHand
return {
title: 'core.sharedfiles.sharedfiles',
class: 'core-sharedfiles-fileuploader-handler',
icon: 'fas-folder',
icon: 'folder', // Cannot use font-awesome in action sheet.
action: (
maxSize?: number,
upload?: boolean,