Skip to content
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

DeckOption become closable if it's not loaded #17905

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Arthur-Milchior
Copy link
Member

Currently, if you try to close the Deck Options before it's loaded, the request anki.deckOptionsPendingChanges() can't be executed and the deck options remain open.

With this change, the deck options is automatically closed. Indeed, if the webview is not loaded, there was no change to save.

This is similar to Anki's implementation.

Thanks David for fixing most of the actual issue

Currently, if you try to close the Deck Options before it's loaded,
the request `anki.deckOptionsPendingChanges()` can't be executed and
the deck options remain open.

With this change, the deck options is automatically closed. Indeed, if
the webview is not loaded, there was no change to save.

This is similar to Anki's implementation.
@Arthur-Milchior
Copy link
Member Author

I tested that it still works when the view is loaded.
I don't know how to test when it's unloaded, as it loads quite fast and I had sent my android device for reparation

@david-allison
Copy link
Member

Cheers! Could you add a @NeedsTest

My phone's too fast to catch this one

Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for merge after re-pushing with the needstest David wanted

good catch + good fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants