Closed sPOiDar closed 2 years ago
Hmm, will have to take a look at the ramifications for this, as I do use ui.windows
in a couple places to check if the app has already been rendered. Is an interesting approach though, thanks!
(And yeah, I've been aware of the need to refactor for popOut: false
for ages, but likewise it's something I haven't felt like spending time on.)
I do use ui.windows in a couple places to check if the app has already been rendered
Ah sorry, didn't notice. I've pushed an updated change that stores the opened state in a static member on the class.
The correct fix here would be to render the application without using a popout at all, but that would require a larger refactor. This small hack simply removes the app from the
ui.windows
list on render, which avoids it being a candidate for close viaEscape
.I started with the goal of removing the special handling I had to put into Stream View to avoid touching Small Time. Unfortunately this change won't let me do that, since it's still rendering a popout, but at least it will let you delete a bunch of ugly code that doesn't really belong in this module, and doesn't play well with others.
I'd love to fix this properly, but I don't have the time to dedicate to untangling the rest of the code here to decouple it from
FormApplication
and move it into a regularApplication
for non-popout rendering (which I think is what would be required).