Skip to content

Commit

Permalink
Issue#11068 PR#35929 [Android] Unify naming of introduced variables
Browse files Browse the repository at this point in the history
Use Composing name everywhere instead of composite to ensure the intent is clear and its not confusing two different things together.
  • Loading branch information
fknives committed Jul 7, 2023
1 parent e9845c0 commit e3fe96e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,12 +623,12 @@ public void maybeSetText(ReactTextUpdate reactTextUpdate) {
if (reactTextUpdate.getText().length() == 0) {
setText(null);
} else {
boolean shouldKeepCompositeSpan = length() == spannableStringBuilder.length();
boolean shouldRestoreComposingSpans = length() == spannableStringBuilder.length();

getText().replace(0, length(), spannableStringBuilder);

if (shouldKeepCompositeSpan) {
attachCompositeSpansToTextFrom(spannableStringBuilder);
if (shouldRestoreComposingSpans) {
restoreComposingSpansToTextFrom(spannableStringBuilder);
}
}
mDisableTextDiffing = false;
Expand Down Expand Up @@ -861,7 +861,7 @@ private void addSpansFromStyleAttributes(SpannableStringBuilder workingText) {
* See {@link ReactEditText#manageSpans} for more details.
* Also https://github.com/facebook/react-native/issues/11068
*/
private void attachCompositeSpansToTextFrom(SpannableStringBuilder spannableStringBuilder) {
private void restoreComposingSpansToTextFrom(SpannableStringBuilder spannableStringBuilder) {
Editable text = getText();
if (text == null) {
return;
Expand Down

0 comments on commit e3fe96e

Please sign in to comment.