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