Does this really work? If we're displaying photo 2 with photo 1 and 3 to the left and right, and a new photo is inserted at index 0, then everything shifts.  If I now click on the edit button, do I edit the correct photo?  If I swipe left or right twice in a row do I see the correct photos?

showFile calls setupFrameContent, and that function has the code that compares the actual filenames and does nothing if the named file is already being displayed.  That was what I did to prevent too much CPU usage in this case.  Why isn't that working?