Repository navigation
Call reattachUploadingMedia() only for Aztec - #9269
Merged
Merged
Conversation
…sure the EditorFragment is already attached
daniloercoli
added a commit
that referenced
this pull request
Feb 19, 2019
…ss-Android into gutenberg/remove-gb-warning-dialog * 'develop' of https://github.com/wordpress-mobile/WordPress-Android: (63 commits) Re-replace private resources with custom ones Call reattachUploadingMedia() only for Aztec (#9269) Updating signature of function for Android 28 Bump version to alpha-152/679 Bump version to alpha-151/677 Bump version to 11.8-rc-2/678 Fix merge Introduce UNDEFINED_RES_ID and use it instead of the "-1" hard coded value Rename variable Update release notes Use the new specific page adapter for each use case Create separate adapters for search and page parent screen Rename PagesAdapter to PageListAdapter Fix androidTests Get site model from the bundle Gb/introduce media options sheet (#9251) Upgrade Tracks to 1.1.6 Fix lint ignores for Gutenberg Update the gutenberg-mobile ref to the merged commit Minor code styling fix ... # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefs.java # WordPress/src/main/res/values/strings.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EDIT: updated description and title to reflect solution as added in 3e6608a
Fixes #9268 by making sure to only make host app -> editor calls to media upload progress reattachment code for Aztec, as Gutenberg relies on the RN side of things to request the host app to start sending updates the other way around (editor -> host app). This is done by means of the
OnReattachQueryListenercall oncecomponenDidMountcallback gets called on the JS side.The crash started happening in current
developafter the introduction of 0e2237f in #9030, after media upload progress reattachment code was merged.There was a call in the SectionsPagerAdapter's
instantiateItemwhen the Fragment was still not attached, but this was unneeded as Gutenberg works differently in this regard: instead of taking the list of currently progressing uploads and then telling the Editor to paint the progress when we know we're about to show it (i.e.onResume()or on the pager adapterinstantiateItemcall) as we do for Aztec, we need to wait to know the RN side of things is ready to receive progress updates, which happens aftercomponentDidMountgets called, which in turn makes the query to the host app through the bridge'sOnReattachQueryListener.To test (copied from #9129):
Try the same on Aztec posts as well.
Update release notes:
RELEASE-NOTES.txt.