MOBILE-3320 calendar: Fix iOS app crash in settings
parent
f9fc2d3758
commit
f5098a770c
|
@ -92,7 +92,7 @@
|
|||
</ion-label>
|
||||
<ion-select formControlName="groupcourseid" aria-labelledby="addon-calendar-groupcourse-label"
|
||||
interface="action-sheet" [placeholder]="'core.noselection' | translate"
|
||||
(ionChange)="groupCourseSelected($event)">
|
||||
(ionChange)="groupCourseSelected()">
|
||||
<ion-select-option *ngFor="let course of courses" [value]="course.id">
|
||||
{{ course.fullname }}
|
||||
</ion-select-option>
|
||||
|
|
|
@ -396,10 +396,9 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy, CanLeave {
|
|||
|
||||
/**
|
||||
* A course was selected, get its groups.
|
||||
*
|
||||
* @param courseId Course ID.
|
||||
*/
|
||||
async groupCourseSelected(courseId: number): Promise<void> {
|
||||
async groupCourseSelected(): Promise<void> {
|
||||
const courseId = this.form.controls.groupcourseid.value;
|
||||
if (!courseId) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-item *ngIf="defaultTime != -1">
|
||||
<ion-label>{{ 'addon.calendar.defaultnotificationtime' | translate }}</ion-label>
|
||||
<ion-select [(ngModel)]="defaultTime" (ionChange)="updateDefaultTime($event)" interface="action-sheet">
|
||||
<ion-select-option value="0">{{ 'core.settings.disabled' | translate }}</ion-select-option>
|
||||
<ion-select-option value="10">{{ 600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="30">{{ 1800 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="60">{{ 3600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="120">{{ 7200 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="360">{{ 21600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="720">{{ 43200 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option value="1440">{{ 86400 | coreDuration }}</ion-select-option>
|
||||
<ion-select [(ngModel)]="defaultTime" (ionChange)="updateDefaultTime(defaultTime)" interface="action-sheet">
|
||||
<ion-select-option [value]="0">{{ 'core.settings.disabled' | translate }}</ion-select-option>
|
||||
<ion-select-option [value]="10">{{ 600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="30">{{ 1800 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="60">{{ 3600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="120">{{ 7200 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="360">{{ 21600 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="720">{{ 43200 | coreDuration }}</ion-select-option>
|
||||
<ion-select-option [value]="1440">{{ 86400 | coreDuration }}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
|
|
@ -26,7 +26,7 @@ import { CoreSites } from '@services/sites';
|
|||
})
|
||||
export class AddonCalendarSettingsPage implements OnInit {
|
||||
|
||||
defaultTime = 0;
|
||||
defaultTime = -1;
|
||||
|
||||
/**
|
||||
* View loaded.
|
||||
|
|
Loading…
Reference in New Issue