Closing modals timeout

Hey,
I’m having this issue: When showing modal dialog shortly after closing one, the new just created modal dialog changes its background color to gray, instead of default white.
I’m currently going around this with: setTimeout(() => {..continue here...}, 700);
Is there any way to just wait for the first modal window to close?`

The code I’m using rn:

progressDialog.close();

    setTimeout(async () => {
        await alert('Alert',
        'Example',
        'File location: ' + rootFolder.nativePath);
    }, 700);`

Could you share the part where you pop two modals consecutively?

@stevekwak

await alert('1',
'First alert shows up how it is supposed to');

await alert('2',
'Second alert shows up with gray background color');

the provided code only has alerts in them. Could you share the part where you use the showModal method?

I mean, it’s not working here either…

I guess my questions is what is that alert function? Can you show what that function looks like?

I’m assuming it’s coming from our plugin toolkit, which provides a simple alert.

But the background color of the dialog isn’t managed by that.

@samodostal, can you confirm that you’re using the plugin toolkit?

Also, try waiting just a little longer and see if that makes a difference. It shouldn’t, but try 1000ms or similar.