-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add confirmation dialog before deleting downloaded album #197
Conversation
I'm pretty sure the method I used to switch between the download/delete button was very jank anyway, I'll have a look and see how I did it :) |
2486579
to
1a660da
Compare
I found a workaround - |
Just realised a better way of doing this - the delete dialog could just return a bool specifying whether or not the delete was confirmed. Deleting downloads should be fast enough that someone can't go and start the download before the delete is done, but if we want to be super safe we could have the dialog return the deleteDownloads future and the download button could disable itself until that future is complete. |
Interestingly I was able to push commits to this PR 😁 Now I'd like to:
Sounds good? |
- made fully generic now
This should be ready for prime time now. @rom4nik if you don't mind, please take another look at my changes and check if there's anything I've missed! |
I just noticed that I completely glossed over the trash icon not changing back to the download icon after deletion. So I guess I'll take another look at this tomorrow... |
Okay, should be fine now :) |
Looks good to me, thanks for fixing up this PR! Some things I've noticed:
I'm not sure if 2-4 are in scope of this PR, just FYI. |
And yes, I considered 2-4 to be out-of-scope. I'll check how much work it would be to add this as well, I only noticed that the artist screen uses some different logic already... |
Artists and genres used the same code, so I added the dialog to both. That means 1-4 should be fixed now. |
Thanks, spotted just two more issues:
|
Good catch! About the wrapping text, yeah I struggled with this a bit but wanted to emphasize that the genre is not being deleted on the server. How would you feel about "Delete files?" |
I'm going to merge this once I get home. If there's anything we missed we can fix it in another PR :) |
Fixes #165.
For some reason the delete button isn't replaced with download button until dialog is shown again, haven't been able to figure out why. Maybe a race condition between
_downloadsHelper.deleteDownloads
and_downloadsHelper.isAlbumDownloaded
called a little bit too early?preview.mp4