Skip to content

Commit

Permalink
Merge pull request #20053 from wordpress-mobile/fix/prevent-gutenberg…
Browse files Browse the repository at this point in the history
…-connection-logic-crashing-aztec

fix: Prevent Gutenberg connection logic from crashing Aztec
  • Loading branch information
dcalhoun authored Jan 26, 2024
2 parents b5f3cd2 + a931b5d commit d4a24a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
24.1
-----

24.0.2
-----
* [**] Fix Aztec editor crash when losing or gaining network connectivity [https://github.com/wordpress-mobile/WordPress-Android/pull/20053]

24.0.1
-----
* [**] Fix crash when RichText values are not defined [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6563]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import org.wordpress.android.editor.EditorMediaUtils;
import org.wordpress.android.editor.EditorThemeUpdateListener;
import org.wordpress.android.editor.ExceptionLogger;
import org.wordpress.android.editor.gutenberg.GutenbergNetworkConnectionListener;
import org.wordpress.android.editor.savedinstance.SavedInstanceDatabase;
import org.wordpress.android.editor.gutenberg.DialogVisibility;
import org.wordpress.android.editor.gutenberg.GutenbergEditorFragment;
Expand Down Expand Up @@ -3844,6 +3845,8 @@ public void onEventMainThread(UploadService.UploadMediaRetryEvent event) {

@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(ConnectionChangeReceiver.ConnectionChangeEvent event) {
if (!(mEditorFragment instanceof GutenbergNetworkConnectionListener)) return;

((GutenbergEditorFragment) mEditorFragment).onConnectionStatusChange(event.isConnected());
}

Expand Down

0 comments on commit d4a24a9

Please sign in to comment.