ankidroid/Anki-Android — pull request #326 by chajadan (2014-05-03 01:53:27+00:00)
Title: Expose audio changes after card edit

Before this change, is a card was edited during review, any changes to the sounds (such a removal) would not be exposed as changed. This addresses that.

This is one thing about this change I do not personally fully understand, but i expect no issues from this:

I reset the sounds after a desk task completes. My change has as an underlying assumption that this will not be run asynchronously, returning at an ~arbitrary~ time, but instead will be such that the changes will be present on the card as it is renders, after the editor is closed. This matches my experience on my device (edited text is always immediately available), and it matches how the code goes through the debugger (serially, completing the updates before rendering the card), but, it is after all an AsyncTask. I don't fully know the behavior of these things except that sometimes it's serial in nature, and I just don't know I am always guaranteed that, or why that would be. However, whether it returns serially or not, the audio flushing/reloading still happens in the right place (after changes saved), and the card is shown right after. So.