Commit 8cc3488e by Matteo

Rimossi loader, fix chiusura menu e fix testo notifiche

parent 71228247
......@@ -238,6 +238,7 @@ export class HomePage {
if(struttura == "notifiche")
{
this.utilService.apriPagina(struttura);
this.closeSideMenu();
return;
}
let ok = false;
......
......@@ -12,6 +12,9 @@ import { ArchiviaNotificaRequest } from '../interface/archivia-notifica-request'
import { ParereResponse } from '../interface/parere-response';
import { UtilService } from './util.service';
import { AuthService } from '../auth/service/auth.service';
import { Platform } from '@ionic/angular';
import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { Notifica } from '../interface/notifica';
@Injectable({
providedIn: 'root'
......@@ -20,7 +23,8 @@ export class NotificheService {
constructor(
private httpClient: HttpClient,
private httpClientDataService: HttpClientDataService
private httpClientDataService: HttpClientDataService,
private platform: Platform
) {
this.initService();
}
......@@ -108,10 +112,12 @@ export class NotificheService {
.pipe(
catchError(this.handleError),
tap( (res: NotificheResponse ) => {
if (!res.error) {
let notifiche: Notifica[] = [];
if(!this.platform.is("desktop"))
res.notifiche.forEach(element => element.contenuto = element.contenuto.replace("<br>", "\r\n"));
this.errorRespose.error = false;
return res;
return notifiche;
}
else{
this.errorRespose.error = true;
......
......@@ -197,16 +197,17 @@ export class UtilService {
}
async showLoading() {
if(this.platform.is("ios")) return null;
/*if(this.platform.is("ios")) return null;
this.loader = await this.loadingCtrl.create({
message: "Please wait...",
});
this.loaders.push(this.loader);
return await this.loader.present();
return await this.loader.present();*/
return null;
}
closeLoading() {
if(this.platform.is("ios")) return null;
/*if(this.platform.is("ios")) return null;
if(this.loaders.length > 0)
{
this.loader = this.loaders.pop();
......@@ -216,7 +217,8 @@ export class UtilService {
setTimeout(() => {
this.secondClose()
}, 2000)
}
}*/
return null;
}
secondClose()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment