MOBILE-4660 storagemanager: Avoid scroll when all sections is selected
parent
a2c6a5b578
commit
a3bb081f60
|
@ -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(
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue