Skip to content

Commit 235eda8

Browse files
committed
Review Android Studio and XCODE errors
1 parent 112ed6f commit 235eda8

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Libraries/Text/Text.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ export interface TextPropsIOS {
5858
export interface TextPropsAndroid {
5959
/**
6060
* Used with nested Text and accessibilityRole measure, money or telephone to specify the unit to announce.
61-
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
62-
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
61+
* Ordinal and Cardinal https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER
62+
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
63+
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
64+
* Verbatim refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_VERBATIM
6365
*/
6466
accessibilitySpan?:
6567
| 'none'

Libraries/Text/TextProps.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ export type TextProps = $ReadOnly<{|
202202

203203
/**
204204
* Used with nested Text and accessibilityRole measure, money or telephone to specify the unit to announce.
205-
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
206-
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
205+
* Ordinal and Cardinal https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER
206+
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
207+
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
208+
* Verbatim refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_VERBATIM
207209
*/
208210
accessibilitySpan?: ?(
209211
| 'none'

ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTtsSpan.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static AccessibilitySpan fromValue(@Nullable String value) {
7676
}
7777
}
7878

79-
public static class Builder<C extends Builder<?>> {
79+
public static class Builder {
8080
private String mType;
8181
private final PersistableBundle mArgs = new PersistableBundle();
8282

@@ -91,19 +91,19 @@ public Builder(AccessibilitySpan type, @Nullable String accessibilityLabel) {
9191
return;
9292
}
9393
try {
94-
if (mType == TYPE_TEXT) {
94+
if (mType.equals(TYPE_TEXT)) {
9595
setStringArgument(ARG_TEXT, accessibilityLabel);
9696
}
97-
if (mType == TYPE_TELEPHONE) {
97+
if (mType.equals(TYPE_TELEPHONE)) {
9898
warningMessage = TYPE_TELEPHONE_WARNING_MSG;
9999
setStringArgument(ARG_NUMBER_PARTS, accessibilityLabel);
100100
}
101101
// https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
102-
if (mType == TYPE_MEASURE) {
102+
if (mType.equals(TYPE_MEASURE)) {
103103
warningMessage = TYPE_MEASURE_WARNING_MSG;
104104
setStringArgument(ARG_UNIT, accessibilityLabel);
105105
}
106-
if (mType == TYPE_CARDINAL || mType == TYPE_ORDINAL) {
106+
if (mType.equals(TYPE_CARDINAL) || mType.equals(TYPE_ORDINAL)) {
107107
setStringArgument(ARG_NUMBER, accessibilityLabel);
108108
}
109109
} catch (Exception e) {

0 commit comments

Comments
 (0)