Skip to content

Commit

Permalink
Fix silly typo error
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarCruz committed Aug 23, 2018
1 parent ecf3d0a commit 6cb4dd3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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).

## [2.0.1] - 2018-08-22

### Fixed
- Silly typo error in last minute edition.

## [2.0.0] - 2018-08-22

Bump v2.0.0 :tada:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This function measures the text as RN does and its result is consistent\* with t

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

\* _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._
\* _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)._

**NOTE:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

import java.util.Map;

@SuppressWarnings("SameParameterValue")
final class RNTextSizeConf {

private static final float DEF_FONTSIZE = 14.0f;
private static final int reactNativeVersion;

Expand Down Expand Up @@ -55,10 +57,6 @@ static boolean supportLetterSpacing() {
return reactNativeVersion >= 55;
}

static float getDefaultFontSize() {
return DEF_FONTSIZE;
}

private final ReadableMap mOpts;
private final boolean allowFontScaling;

Expand Down Expand Up @@ -102,7 +100,6 @@ String getString(@NonNull final String name) {
? mOpts.getString(name) : null;
}

@SuppressWarnings("SameParameterValue")
@Nullable
ReadableArray getArray(@NonNull final String name) {
return mOpts.hasKey(name) && mOpts.getType(name) == ReadableType.Array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

final String text = texts.getString(ix);
if (text.isEmpty()) {
result.pushDouble(minimalHeight(density, includeFontPadding);
result.pushDouble(minimalHeight(density, includeFontPadding));
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-text-size",
"version": "2.0.0",
"version": "2.0.1",
"description": "Measure text accurately before laying it out and get font information from your App",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit 6cb4dd3

Please sign in to comment.