fix infinite loader on sessions load

This commit is contained in:
Matt Hill
2021-08-09 16:25:33 -06:00
parent fb6c23b8da
commit 8b87c077c9

View File

@@ -1,5 +1,5 @@
import { Component } from '@angular/core' import { Component } from '@angular/core'
import { AlertController, getPlatforms, LoadingController } from '@ionic/angular' import { AlertController, LoadingController } from '@ionic/angular'
import { ErrorToastService } from 'src/app/services/error-toast.service' import { ErrorToastService } from 'src/app/services/error-toast.service'
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service' import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
import { PlatformType, RR } from 'src/app/services/api/api.types' import { PlatformType, RR } from 'src/app/services/api/api.types'
@@ -21,9 +21,13 @@ export class SessionsPage {
) { } ) { }
async ngOnInit () { async ngOnInit () {
getPlatforms() try {
this.sessionInfo = await this.embassyApi.getSessions({ }) this.sessionInfo = await this.embassyApi.getSessions({ })
this.loading = false } catch (e) {
this.errToast.present(e.message)
} finally {
this.loading = false
}
} }
async presentAlertKill (hash: string) { async presentAlertKill (hash: string) {