Skip to content

Commit

Permalink
Issue #000 fix: Removed the unit from the output.
Browse files Browse the repository at this point in the history
  • Loading branch information
swayangjit committed Jul 30, 2019
1 parent e3f5de3 commit 6bbbdd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/NetworkSpeedPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ private void getNetworkSpeed(CallbackContext callbackContext) {

double speed = (double) totalSpeed / 1024;
if (speed > 1) {
callbackContext.success(String.valueOf((int) speed) + " KB/s");
callbackContext.success(String.valueOf((int) speed));
} else {
callbackContext.success(String.format(Locale.ENGLISH, "%.3f", (double) totalSpeed / 1024) + " KB/s");
callbackContext.success(String.format(Locale.ENGLISH, "%.3f", (double) totalSpeed / 1024));
}
} catch (Exception e) {
callbackContext.error(e.getMessage());
Expand Down

0 comments on commit 6bbbdd2

Please sign in to comment.