diff --git a/src/core/features/fileuploader/components/components.module.ts b/src/core/features/fileuploader/components/audio-recorder/audio-recorder.module.ts similarity index 76% rename from src/core/features/fileuploader/components/components.module.ts rename to src/core/features/fileuploader/components/audio-recorder/audio-recorder.module.ts index 118c8e573..3b50dd3b7 100644 --- a/src/core/features/fileuploader/components/components.module.ts +++ b/src/core/features/fileuploader/components/audio-recorder/audio-recorder.module.ts @@ -12,10 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { NgModule } from '@angular/core'; import { CoreSharedModule } from '@/core/shared.module'; -import { CoreFileUploaderAudioRecorderComponent } from './audio-recorder/audio-recorder.component'; -import { CoreFileUploaderAudioHistogramComponent } from './audio-histogram/audio-histogram'; +import { NgModule } from '@angular/core'; +import { CoreFileUploaderAudioHistogramComponent } from '@features/fileuploader/components/audio-histogram/audio-histogram'; + +import { CoreFileUploaderAudioRecorderComponent } from './audio-recorder.component'; + +export { CoreFileUploaderAudioRecorderComponent }; @NgModule({ imports: [ @@ -25,9 +28,5 @@ import { CoreFileUploaderAudioHistogramComponent } from './audio-histogram/audio CoreFileUploaderAudioRecorderComponent, CoreFileUploaderAudioHistogramComponent, ], - exports: [ - CoreFileUploaderAudioRecorderComponent, - CoreFileUploaderAudioHistogramComponent, - ], }) -export class CoreFileUploaderComponentsModule {} +export class CoreFileUploaderAudioRecorderComponentModule {} diff --git a/src/core/features/fileuploader/fileuploader.module.ts b/src/core/features/fileuploader/fileuploader.module.ts index 4b9f58e4f..c0774617d 100644 --- a/src/core/features/fileuploader/fileuploader.module.ts +++ b/src/core/features/fileuploader/fileuploader.module.ts @@ -13,7 +13,6 @@ // limitations under the License. import { APP_INITIALIZER, NgModule, Type } from '@angular/core'; -import { CoreFileUploaderComponentsModule } from '@features/fileuploader/components/components.module'; import { CoreFileUploaderProvider } from './services/fileuploader'; import { CoreFileUploaderDelegate, CoreFileUploaderDelegateService } from './services/fileuploader-delegate'; @@ -31,9 +30,6 @@ export const CORE_FILEUPLOADER_SERVICES: Type[] = [ ]; @NgModule({ - imports: [ - CoreFileUploaderComponentsModule, - ], providers: [ { provide: APP_INITIALIZER, diff --git a/src/core/features/fileuploader/services/fileuploader.ts b/src/core/features/fileuploader/services/fileuploader.ts index 1a10f6de6..9926844da 100644 --- a/src/core/features/fileuploader/services/fileuploader.ts +++ b/src/core/features/fileuploader/services/fileuploader.ts @@ -32,7 +32,6 @@ import { CoreSite } from '@classes/site'; import { CoreFileEntry, CoreFileHelper } from '@services/file-helper'; import { CorePath } from '@singletons/path'; import { CorePlatform } from '@services/platform'; -import { CoreFileUploaderAudioRecorderComponent } from '@features/fileuploader/components/audio-recorder/audio-recorder.component'; import { CoreModals } from '@services/modals'; /** @@ -159,6 +158,9 @@ export class CoreFileUploaderProvider { * @returns Promise resolved with the file. */ async captureAudioInApp(): Promise { + const { CoreFileUploaderAudioRecorderComponent } = + await import('@features/fileuploader/components/audio-recorder/audio-recorder.module'); + const recording = await CoreModals.openSheet(CoreFileUploaderAudioRecorderComponent); if (!recording) {