Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
The problem only appear in some components. In "ustaweinia.component" work as expected but in "wiadomosci.component" after invoke showModal(), this error is occurring:
ViewHierarchy: Parent is already presenting view controller. Close the current modal page before showing another one!
Both components are in Tab component. There is no other modals which is opened. Only difference is that in "wiadomosci.component" (broken) method is invoked by longPress method on component.
Is there any code involved?
wiadomosci.component.ts (broken)
`import { Component, OnInit, ViewChild, ElementRef, ViewContainerRef } from '@angular/core';
import { Page } from 'tns-core-modules/ui/page/page';
import { Wiadomosc } from '~/app/serwisy/wiadomosci.model';
import { Subscription } from 'rxjs';
import { WiadomosciService } from '~/app/serwisy/wiadomosci.service';
import { TextField } from 'tns-core-modules/ui/text-field/text-field';
import { getFile } from 'tns-core-modules/http';
import as fileSystem from "tns-core-modules/file-system";
import { isAndroid} from "tns-core-modules/platform";
import as permission from 'nativescript-permissions'
import { PotwierdzenieModalComponent } from '~/app/shared/modale/potwierdzenie-modal/potwierdzenie-modal.component';
import { ModalDialogService } from 'nativescript-angular/modal-dialog';
import { ExtendedShowModalOptions } from 'nativescript-windowed-modal-updated';
import { UiService } from '~/app/serwisy/ui.service';
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
The problem only appear in some components. In "ustaweinia.component" work as expected but in "wiadomosci.component" after invoke showModal(), this error is occurring: ViewHierarchy: Parent is already presenting view controller. Close the current modal page before showing another one! Both components are in Tab component. There is no other modals which is opened. Only difference is that in "wiadomosci.component" (broken) method is invoked by longPress method on component.
Is there any code involved?
wiadomosci.component.ts (broken)
`import { Component, OnInit, ViewChild, ElementRef, ViewContainerRef } from '@angular/core'; import { Page } from 'tns-core-modules/ui/page/page'; import { Wiadomosc } from '~/app/serwisy/wiadomosci.model'; import { Subscription } from 'rxjs'; import { WiadomosciService } from '~/app/serwisy/wiadomosci.service'; import { TextField } from 'tns-core-modules/ui/text-field/text-field'; import { getFile } from 'tns-core-modules/http'; import as fileSystem from "tns-core-modules/file-system"; import { isAndroid} from "tns-core-modules/platform"; import as permission from 'nativescript-permissions' import { PotwierdzenieModalComponent } from '~/app/shared/modale/potwierdzenie-modal/potwierdzenie-modal.component'; import { ModalDialogService } from 'nativescript-angular/modal-dialog'; import { ExtendedShowModalOptions } from 'nativescript-windowed-modal-updated'; import { UiService } from '~/app/serwisy/ui.service';
declare var android
@Component({ selector: 'ns-wiadomosci-o', templateUrl: './wiadomosci-o.component.html', styleUrls: ['./wiadomosci-o.component.css'], moduleId: module.id, }) export class WiadomosciOComponent implements OnInit {
}`
ustawienia.component.ts
`import { Component, OnInit, ViewContainerRef } from '@angular/core'; import { Page } from 'tns-core-modules/ui/page/page'; import { RouterExtensions } from 'nativescript-angular/router'; import as utils from "tns-core-modules/utils/utils"; import as email from "nativescript-email"; import { UserService } from '~/app/serwisy/user.service'; import { TabindexService } from '~/app/serwisy/tabindex.service'; import { Subscription } from 'rxjs'; import { ActivatedRoute } from '@angular/router'; import { HttpService } from '~/app/serwisy/http.service'; import { ParafiaService } from '~/app/serwisy/parafia.service'; import { WiadomosciService } from '~/app/serwisy/wiadomosci.service'; import { WydarzeniaService } from '~/app/serwisy/wydarzenia.service'; import { SecureStorage } from 'nativescript-secure-storage'; import { ModalDialogService } from 'nativescript-angular/common'; import { PotwierdzenieModalComponent } from '~/app/shared/modale/potwierdzenie-modal/potwierdzenie-modal.component'; import { ExtendedShowModalOptions } from 'nativescript-windowed-modal-updated'; import { UiService } from '~/app/serwisy/ui.service';
@Component({ selector: 'ns-ustawienia-o', templateUrl: './ustawienia-o.component.html', styleUrls: ['./ustawienia-o.component.css'], moduleId: module.id, }) export class UstawieniaOComponent implements OnInit {
}`
Thanks in advance for any help !