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

[Gutenberg] Fix media upload progress indicators #20426

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,27 @@ public void onEditorThemeUpdated(Bundle editorTheme) {
getGutenbergContainerFragment().updateTheme(editorTheme);
}

@Override public void onMediaSaveReattached(String localId, float currentProgress) {
mUploadingMediaProgressMax.put(localId, currentProgress);
getGutenbergContainerFragment().mediaFileSaveProgress(localId, currentProgress);
}

@Override public void onMediaSaveSucceeded(String localId, String mediaUrl) {
mUploadingMediaProgressMax.remove(localId);
getGutenbergContainerFragment().mediaFileSaveSucceeded(localId, mediaUrl);
}

@Override public void onMediaSaveProgress(String localId, float progress) {
mUploadingMediaProgressMax.put(localId, progress);
getGutenbergContainerFragment().mediaFileSaveProgress(localId, progress);
}

@Override public void onMediaSaveFailed(String localId) {
getGutenbergContainerFragment().mediaFileSaveFailed(localId);
mFailedMediaIds.add(localId);
mUploadingMediaProgressMax.remove(localId);
}

@Override
public void showNotice(String message) {
getGutenbergContainerFragment().showNotice(message);
Expand Down