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

Fix/1268 content is missing on long posts in html mode #1401

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
------
* Fix a bug on iOS 13.0 were tapping on a link opens Safari
* Fix a link editing issue, where trying to add a empty link at the start of another link would remove the existing link.
* Fix missing content on long posts in html mode on Android

1.12.0
------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.Application;
import android.content.Context;
import android.content.MutableContextWrapper;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
Expand Down Expand Up @@ -521,7 +522,17 @@ public void appendMediaFile(int mediaId, final String mediaUrl, final boolean is
}
}

public void toggleEditorMode() {
public void toggleEditorMode(boolean htmlModeEnabled) {
// Turn off hardware acceleration for Oreo
// see https://github.com/wordpress-mobile/gutenberg-mobile/issues/1268#issuecomment-535887390
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
&& Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
if (htmlModeEnabled) {
mReactRootView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
} else {
mReactRootView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
}
mRnReactNativeGutenbergBridgePackage.getRNReactNativeGutenbergBridgeModule().toggleEditorMode();
}

Expand Down