-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Deck options without bridge #3571
Deck options without bridge #3571
Conversation
Reference: ankidroid/Anki-Android#14361 (comment) |
Sorry for the delayed review. A couple of questions:
|
Regarding js's By the way, I guess the same problem would occur in ankidroid, with Regarding Anyway, even if we end up with duplication because this feature is used in two views, that does not seems that bad. |
5d8d3ba
to
ef0c610
Compare
We already use confirm() when the user removes a preset in the deck options, so there's precedent. I believe all platforms have the ability to intercept the confirm() request, and present it as they wish. The desktop does this with javaScriptConfirm() https://stackoverflow.com/questions/2726377/how-to-handle-a-webview-confirm-dialog As those methods will only be used for the deck options for now, I think adding 'deckOptions' to them might be a bit clearer. |
ef0c610
to
2438145
Compare
And now it uses I must note that "confirm" seems to only accept ok/cancel. So we don't have the "discard"/"keep editing" button anymore. But, at least in English, it's not ambiguous. |
7858603
to
d1e94e0
Compare
Pylint check is failing due to an unused |
Just so that I stop getting the warning
The method will have to be used outside of this class, so can't be private
d1e94e0
to
119d5b8
Compare
Thanks for seeing this through Arthur! confirm() did make it a bit simpler. |
Thanks to @BrayanDSO I learned we were not supposed to have BridgeCommand anymore. So here I remove them in the deck options