MobileSheets Forums

Full Version: Undo Delete
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was messing around with a Setlist and unintentionally deleted the entire contents. I started rebuilding it and deleted a song from the new setlist. I didn't realize I was still in the main library. Would you please consider adding a 'Undo Delete' in those places that permanently delete files. You do have an 'Are You Sure?' popup but I punched through it not realizing where I was.
I'll look into doing this in the future when time allows. It's not a simple thing to support that though. All of the song data is removed from the database when you delete it (and a ton of different database tables are impacted by this). Files are also potentially deleted in the process (song files, audio files, stamp files that are no longer used, etc). So there are two options:

1) I don't actually delete anything for a period of 5-10 seconds, and an undo delete is shown until the changes are actually committed. This is similar to how gmail works where it lets you send something, but won't actually send it for 5 seconds or so, giving you the ability to cancel the send. 

2) I have to buffer all of the song data and store it somewhere, and all of the files that will be deleted will instead be moved to the cache folder. The ability to undo would stay available until the next song is deleted, at which point everything would be permanently deleted. I don't think it makes sense to support being able to undo multiple deletions that happened in a row. If the undo occurs, I will have to repopulate the database with all the song data, fix all group tables that were impacted (setlists, collections, etc), then copy back all of the files to their original location

#2 will be a pain to implement, but I imagine #1 probably wouldn't have prevented you from deleting the song as you wouldn't have realized what you did in time, correct?

I think #1 would work pretty well if the time were extended, maybe to 60 sec [ I'm an old guy and don't react very fast  Rolleyes ] .
Would it be easier to just mark the item(s) for deletion, clear the display of the item, but don't actually do anything to delete until the next restart or shutdown. Is that different from #2? The undo would be clearing the mark.
My 2 cents.

Skip, I know the pain. I once similarily lost a whole harddrive with painfully organized data because I forgot I linked it to a junction I deleted.

But I really don't think you need more safety measures for ignoring those warnings or not reading theme.

I'm not saying "you deserve it for not reading", but is it likely that it happens to you again after this experience? (I learned my lesson and am way more cautious with deleting
or  clicking ok on warnings.

Maybe it's an option to make the warning more obtrusive (bigger, bolder) if data loss is involved. But personally I don't think MSP needs an undo for deleting files (IMHO).
You're probably right, but I've done it before and I'll likely do it again in the future.  Blush  It's not really that important, I just thought I'd bring it up for consideration.
The problem I have with #1 is, if the user deletes something, then suspends or kills the app, they are going to expect what they deleted to actually have been deleted. If I don't persist the changes until the timeout is over, you could end up with a scenario where thing you tried to delete wasn't deleted, which would certainly annoy users. I think if I'm going to do this, it would have to be something along the lines of #2, or at least a very short timeout for option #1 (i.e. like 5 seconds). 

That really would b irritating.Probably best to table this idea.