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;
if (initialSectionId !== undefined) {
if (initialSectionId !== undefined && initialSectionId > 0) {
this.accordionMultipleValue.push(initialSectionId.toString());
CoreDom.scrollToElement(

View File

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