improve go back

This commit is contained in:
Peter Maquiran
2022-01-06 14:47:22 +01:00
parent be06d3b3d1
commit 73354e00af
28 changed files with 153 additions and 58 deletions
@@ -9,6 +9,8 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
import { Location } from '@angular/common';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-event-actions-popover',
@@ -27,7 +29,7 @@ export class EventActionsPopoverPage implements OnInit {
private popoverController: PopoverController,
private animationController: AnimationController,
private toastService: ToastService,
private location: Location,
private RouteService: RouteService,
public ThemeService: ThemeService) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('InstanceId');
@@ -44,7 +46,7 @@ export class EventActionsPopoverPage implements OnInit {
goBack() {
this.closePopover();
this.location.back()
this.RouteService.goBack()
}
closePopover() {
@@ -20,6 +20,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { BackgroundService } from 'src/app/services/background.service';
import { StorageService } from 'src/app/services/storage.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
@@ -71,7 +72,8 @@ export class ViewEventPage implements OnInit {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private storage: StorageService,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private RouteService: RouteService,
) {
this.isEventEdited = false;
this.loadedEvent = new Event();
@@ -179,7 +181,7 @@ export class ViewEventPage implements OnInit {
this.toastService.badRequest('Este evento já não existe na sua agenda')
loader.remove()
this.modalController.dismiss('Eevent not Foud');
this.location.back();
this.RouteService.goBack();
}
loader.remove()
});
@@ -361,7 +363,7 @@ export class ViewEventPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(res => {
//this.location.back();
//this.RouteService.goBack();
});
}