Skip to content

Commit

Permalink
feat: Only retry media uploads if a network connection is available
Browse files Browse the repository at this point in the history
Retrying media uploads without a network connection will undoubtedly fail again.

Co-authored-by: Antonis Lilis <[email protected]>
  • Loading branch information
dcalhoun and Antonis Lilis authored Dec 19, 2023
1 parent c114528 commit 3fb85a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ public void onGutenbergDialogNegativeClicked(@NonNull String instanceTag) {
@Override
public void onConnectionStatusChange(boolean isConnected) {
getGutenbergContainerFragment().onConnectionStatusChange(isConnected);
if (BuildConfig.DEBUG && hasFailedMediaUploads()) {
if (BuildConfig.DEBUG && isConnected && hasFailedMediaUploads()) {
mEditorFragmentListener.onMediaRetryAll(mFailedMediaIds);
}
}
Expand Down

0 comments on commit 3fb85a3

Please sign in to comment.