FlashpointProject / launcher

Launcher for Flashpoint Archive

Home Page:https://flashpointarchive.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Deleting an Additional Application does not remove the entry from the database

Seirade opened this issue · comments

Describe the bug
When deleting an Additional Application, the entry remains in the additional_application table. The Launcher simply sets parentGameId to null, rather than deleting the record.

To Reproduce
For this example, I'm using the AddApp with id bed78efb-f203-45e4-a5f0-d87bd24fb46e

  1. Open the DB and search for the AddApp:
select id, name, parentGameId from additional_app where id = "bed78efb-f203-45e4-a5f0-d87bd24fb46e";
  1. Notice that the entry has a parentGameId of 000bf5cc-f047-53c1-711e-212af7cf76b9
  2. Open Flashpoint and search for Castle Tales (or id:000bf5cc-f047-53c1-711e-212af7cf76b9)
  3. Enable editing in Config if it already isn't, then click on the pencil icon to edit the entry.
  4. Scroll down and delete the Additional Application (trash can icon) and confirm. Scroll back up and click on the checkbox icon to save changes.
  5. Close Flashpoint, then open the DB and run the same query from Step 1
  6. The parentGameId is now null

Expected behavior
The Launcher should delete the appropriate Additional Application from the table, rather than setting the parentGameId. Using the example above, it should run something like:

delete from additional_app where id = "bed78efb-f203-45e4-a5f0-d87bd24fb46e";

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 8.1
  • Flashpoint Version: Core 10 (Launcher version 10.0.0)

Additional context
N/A

The function

onAddAppDelete = (addAppId: string): void => {
doesn't delete the add-app. Child curations PR will fix this.