MOBILE-4660 storagemanager: Avoid scroll when all sections is selected

main
Pau Ferrer Ocaña 2024-09-26 13:39:58 +02:00 committed by Dani Palou
parent a2c6a5b578
commit a3bb081f60
2 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,7 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy {
this.loaded = true; this.loaded = true;
if (initialSectionId !== undefined) { if (initialSectionId !== undefined && initialSectionId > 0) {
this.accordionMultipleValue.push(initialSectionId.toString()); this.accordionMultipleValue.push(initialSectionId.toString());
CoreDom.scrollToElement( CoreDom.scrollToElement(

View File

@ -529,14 +529,14 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
* Open course downloads page. * Open course downloads page.
*/ */
async gotoCourseDownloads(): Promise<void> { async gotoCourseDownloads(): Promise<void> {
const selectedId = await this.getSelectedSectionId(); const sectionId = this.selectedSection?.id !== this.allSectionsId ? this.selectedSection?.id : undefined;
CoreNavigator.navigateToSitePath( CoreNavigator.navigateToSitePath(
`storage/${this.course.id}`, `storage/${this.course.id}`,
{ {
params: { params: {
title: this.course.fullname, title: this.course.fullname,
sectionId: selectedId, sectionId,
isGuest: this.isGuest, isGuest: this.isGuest,
}, },
}, },