James01010101 / Comic_Tracker

IOS Swift app for tracking my comics
0 stars 0 forks source link

Only save the files of the ones that have changed #24

Open James01010101 opened 2 months ago

James01010101 commented 2 months ago

If im creating a new comic and it doesnt have an event i dont need to run the save all function to also save the event file since it wouldnt have changed.

ALso look at this for deleting only rewrite the files you need to

pass params for each file to save as a bool and just be true or false if you are going to save (saveData: true, saveSeries: true, saveEvent: false)

make sure the checks for failed saved work if i pass falses and dont look at saving an event. itll default to successfully saved

Store a dirty bool for each of them. then whenever i change any of them i set it to true. then when i go to save whether auto or manually it only saves the files that are dirty. THis then works for manual saving where i dont want to save the files straight away and i need to keep track of what has changed