Shake to undo is fine if all I’ve done is press easy/hard/whatever.
Shake to undo is a bit aggressive if I’ve actually edited a card - it would be nicer if it gave a warning before proceeding.
The background to this is that sometimes when I let the iPhone go to sleep with Anki open, it does/has done an undo when it comes back, which has sometimes meant I’ve lost edits.
I suspect this is because of shake to undo, though it’s hard to know how to test this - if I give it a shake I can reproduce the behaviour, but that’s very deliberate.
I don’t have another way to reproduce it on demand. This isn’t a sync issue.
I’m going to try turning off shake to undo, which may or may not fix my main problem, but even if it does, I still think that shake to undo shouldn’t undo edits, not without a confirmation anyway.
The standard iOS app behavior is that when you shake to undo, a confirmation alert appears asking the user if they want to Undo or if they instead want to Cancel the operation. The AnkiMobile app might want to consider changing its behavior to add this confirmation alert.
Help people predict the results of undo and redo as much as possible. On iPhone, for example, you can describe the result in the alert that displays when people shake the device, giving them the option of performing the undo or canceling it.
If you accidentally undo something, you can usually “redo” it. Have you tried that? Redo is available in the ⚙️ Study Tools menu and in ⚙️ Preferences – and it should say what it is redo-ing.
I haven’t been able to reproduce note edits that are actually lost. But as you pointed out, changing the shake action to something else (or “Off”) will prevent this from happening.
As far as I can tell, AnkiMobile has 2 behaviors –
If the thing can be easily “redone,” the shake-undo happens automatically with just a brief pop-up, and Redo is available in the menus.
If the thing cannot be easily “redone” (like typing something in a note that is still open for editing), the shake-undo gives a confirmation alert instead.
Interesting. I didn’t realise that was an option.
I’ll turn shake to undo back on and see what happens.
Part of the problem is that, apart from not knowing about the Redo option, I don’t always realise that it’s happened.
I don’t normally have any accidental shakes.
I’m not 100% sure that accidental shakes are the problem here.
It’s just the best theory I have at the moment.
All I know for sure is that something sometimes causes Anki to do an undo, if I let it go to sleep and then wake it up again.
Not often, just sometimes, when I open Anki, I’ve had changes vanish.
And sometimes, it looks like the below.
So I am confident that something is triggering an undo.
I’ve been able to reproduce the problem often enough that I’m sure it’s real.
But I haven’t been able to find a reproducible use case.
Shake is my best suspect, but I’m far from sure of anything much.