Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDITOR: fix disposing models #1026

Merged
merged 4 commits into from
Jan 9, 2024
Merged

Conversation

Caldwell-74
Copy link
Contributor

@Caldwell-74 Caldwell-74 commented Jan 9, 2024

the unmount of the editor didnt dispose the models correctly
could be that this was already the case before the URI changes and only got visible after

added a few more checks that if a model already exist that its loaded instead of creating a new one

and removed an imho annoying toTerminal call when closing and saving a script
it will still go to the terminal when its the last script that gets closed

the extra dispose and checks might be hard to verify that they work but i disabled the dispose on unmount and tested each of them alone

@Caldwell-74
Copy link
Contributor Author

extracted the model logic
that way if we ever want to support more file extenstion we have one place to change the logic

@Caldwell-74
Copy link
Contributor Author

we could keep the models of openScripts around so we dont have to recreate them not sure how heavy that computational wise is

@Snarling
Copy link
Collaborator

Snarling commented Jan 9, 2024

Nice work! I will get this built on web/steam shortly

@Snarling Snarling merged commit 6f8a595 into bitburner-official:dev Jan 9, 2024
5 checks passed
@Caldwell-74 Caldwell-74 deleted the uri-test branch January 10, 2024 07:06
G4mingJon4s pushed a commit to G4mingJon4s/bitburner-src that referenced this pull request Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants