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

Fix: Prevent Auto-loading of Projects from Trash (#3208) #3325

Merged

Conversation

d1vyanshu-kumar
Copy link
Contributor

General items:

If your code changes how something works on the device (i.e., it affects the companion):

  • I branched from Master
  • My pull request has Master as the base

For all other changes:

  • I branched from master
  • My pull request has master as the base

What does this PR accomplish?

  • Prevent Auto-loading of Projects from Trash.
  1. Check if userSettings is null: If userSettings is null, log a warning and return.
  2. Retrieve the last opened project ID: Get the last opened project ID from the user settings.
  3. Check if the project ID is empty: If the project ID is empty, switch to the Projects view and return.
  4. Check if the project is in the trash: Use the isProjectInTrash method to check if the project is in the trash. If it is, switch to the Projects view.
  5. Open the project: If the project is not in the trash, open the project.

Resolves #3208

@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

@ewpatton
Copy link
Member

@AppInventorWorkerBee ok to test

@ewpatton
Copy link
Member

@d1vyanshu-kumar You need to merge the latest copy of master into this branch for the Jenkins run to succeed.

@d1vyanshu-kumar
Copy link
Contributor Author

@ewpatton,
I've merged the master branch into this branch, but the checks are still failing. Did I miss something? Could you please guide me?

@d1vyanshu-kumar You need to merge the latest copy of master into this branch for the Jenkins run to succeed.

Copy link
Contributor

@SusanRatiLane SusanRatiLane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and tests out.

@SusanRatiLane
Copy link
Contributor

@ewpatton, I've merged the master branch into this branch, but the checks are still failing. Did I miss something? Could you please guide me?

It looks like the current test failure was Create Many Android Projects, which created 49 rather than 50. This seems unlikely to have anything to do with this PR. I will try running again.

@SusanRatiLane
Copy link
Contributor

@AppInventorWorkerBee ok to test

@SusanRatiLane SusanRatiLane merged commit ed9bbbc into mit-cml:master Jan 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-loading project from Trash
4 participants