summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/res/menu
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-01 01:38:39 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-01 01:38:39 -0500
commit2d747aab64f36872ae3074ee4b91a4ed1e4d07e4 (patch)
treec9fe552530eb3e7d3a98bae8fa2c0f019c458eca /app/src/main/res/menu
parent92d9b8a5fd28a9661c2cca8e359076539bf016a3 (diff)
ProfileService: Rework profile updating
This should help discourage editing a Profile without making a copy first, since the caller has to keep track of the old Profile as well. ProfileAdder has been updated to prevent adding duplicate profiles. It checks once in the constructor, so the caller can catch the exception and pass the error back to the UI. It checks again in the worker thread to prevent any race from happening if a profile is added twice quickly. Either the file exists, or it doesn't. Additionally, this change solves the race condition when the old profile is removed before it is updated; previously this would lead to the profile being re-added. Now, ProfileRemover will fail and the profile will stay removed. Finally, updating a profile's name should now work correctly. There were previously multiple bugs with that (the old profile wasn't removed, the new one could duplicate a name, the new one could overwrite some random other one, etc.).
Diffstat (limited to 'app/src/main/res/menu')
0 files changed, 0 insertions, 0 deletions