Commit 8ba4b56 1 parent 08aec81 commit 8ba4b56 Copy full SHA for 8ba4b56
File tree 1 file changed +7
-2
lines changed
android/src/main/java/com/expensify/livemarkdown
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3
3
import androidx .annotation .Nullable ;
4
4
5
5
import android .content .Context ;
6
+ import android .text .Editable ;
7
+ import android .text .SpannableStringBuilder ;
6
8
import android .text .TextWatcher ;
7
9
import android .util .AttributeSet ;
8
10
@@ -92,8 +94,11 @@ protected void setParserId(int parserId) {
92
94
}
93
95
94
96
protected void applyNewStyles () {
95
- if (mReactEditText != null ) {
96
- mReactEditText .setTextKeepState (mReactEditText .getText ()); // trigger update
97
+ if (mReactEditText != null && mMarkdownUtils != null ) {
98
+ Editable editable = mReactEditText .getText ();
99
+ if (editable instanceof SpannableStringBuilder ssb ) {
100
+ mMarkdownUtils .applyMarkdownFormatting (ssb );
101
+ }
97
102
}
98
103
}
99
104
}
You can’t perform that action at this time.
0 commit comments