Skip to content

Commit 6cb4dd3

Browse files
committed
Fix silly typo error
1 parent ecf3d0a commit 6cb4dd3

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [2.0.1] - 2018-08-22
6+
7+
### Fixed
8+
- Silly typo error in last minute edition.
9+
510
## [2.0.0] - 2018-08-22
611

712
Bump v2.0.0 :tada:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This function measures the text as RN does and its result is consistent\* with t
7474

7575
If you provide the `width`, the measurement will apply automatic wrapping in addition to the explicit line breaks.
7676

77-
\* _On iOS, RN takes into account the absolute position on the screen to calculate the dimensions. rnTextSize can't do that but adds 1 pixel to both width and height avoid overflow._
77+
\* _On iOS, RN takes into account the absolute position on the screen to calculate the dimensions. rnTextSize can't do that and both width and height can have a difference of uo to 1 pixel (not point)._
7878

7979
**NOTE:**
8080

android/src/main/java/com/github/amarcruz/rntextsize/RNTextSizeConf.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
import java.util.Map;
1919

20+
@SuppressWarnings("SameParameterValue")
2021
final class RNTextSizeConf {
22+
2123
private static final float DEF_FONTSIZE = 14.0f;
2224
private static final int reactNativeVersion;
2325

@@ -55,10 +57,6 @@ static boolean supportLetterSpacing() {
5557
return reactNativeVersion >= 55;
5658
}
5759

58-
static float getDefaultFontSize() {
59-
return DEF_FONTSIZE;
60-
}
61-
6260
private final ReadableMap mOpts;
6361
private final boolean allowFontScaling;
6462

@@ -102,7 +100,6 @@ String getString(@NonNull final String name) {
102100
? mOpts.getString(name) : null;
103101
}
104102

105-
@SuppressWarnings("SameParameterValue")
106103
@Nullable
107104
ReadableArray getArray(@NonNull final String name) {
108105
return mOpts.hasKey(name) && mOpts.getType(name) == ReadableType.Array

android/src/main/java/com/github/amarcruz/rntextsize/RNTextSizeModule.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
import java.io.IOException;
2929
import java.util.ArrayList;
3030
import java.util.Collections;
31-
import java.util.HashMap;
3231
import java.util.List;
33-
import java.util.Map;
3432

3533
class RNTextSizeModule extends ReactContextBaseJavaModule {
3634
private static final String TAG = "RNTextSize";
@@ -207,7 +205,7 @@ public void flatHeights(@Nullable final ReadableMap specs, final Promise promise
207205

208206
final String text = texts.getString(ix);
209207
if (text.isEmpty()) {
210-
result.pushDouble(minimalHeight(density, includeFontPadding);
208+
result.pushDouble(minimalHeight(density, includeFontPadding));
211209
continue;
212210
}
213211

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-text-size",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Measure text accurately before laying it out and get font information from your App",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)