-
-
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
refactor: mount receivers #16714
refactor: mount receivers #16714
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
d90bdc8
to
77f766b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works locally on an API23 emulator even (have to do some manual clicking because of the outdated-webview-check popup, during test)
this picks cleanly to release-2.18 in case we need it
@david-allison with limited time and having already reviewed it I'm not sure on the value of splitting the refactor to a commit. It appears to work in local testing, I'd merge as is but you've got a pending reject, so back to you |
Agreed - refactor would be better as a PR |
This comment was marked as resolved.
This comment was marked as resolved.
77f766b
to
f5e66cc
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
For posterity: d90bdc8 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
cf8d770
to
34a2c9f
Compare
34a2c9f
to
38a39d5
Compare
8eb3512
to
b0c3b08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NoteEditor
confuses me. The rest are nitpicks
Reviewed changes were split out into 16717
This ensure that the same receiver appears in all activities and not just the few one where the code was essentially copy pasted. The Deck Picker also listen for mounting, so I renamed its receiver as a `mountReceiver` instead
b0c3b08
to
3e86f44
Compare
This ensure there is no change in behaviour.
I checked whether we could try to not export the download of decks, but it does not works.
The app does not crash on api 24 on simulator.
There was a slight problem, with variables that could potentially be null. To ensure the type checker agreed with the code, without using
!!
, I had to rewrite some of the logic.I also ensured that some of the code that was copy/pasted in various activity now entirely belong to AnkiActivity. As a side effect, all activities that used to listen to the "unmount" notification and finished, will now also show a toast when the card gets unmounted. Currently it was only the deck picker.