chore: fix eslint issues (#9017)

This commit is contained in:
Martin Guillon
2020-11-11 17:46:36 +01:00
committed by GitHub
parent 05faa867d0
commit c1f231d88e
171 changed files with 1607 additions and 1550 deletions

View File

@@ -31,7 +31,7 @@ export class Progress extends ProgressBase {
return null;
}
[colorProperty.setNative](value: Color) {
let progressDrawable = this.nativeViewProtected.getProgressDrawable();
const progressDrawable = this.nativeViewProtected.getProgressDrawable();
if (!progressDrawable) {
return;
}
@@ -47,13 +47,13 @@ export class Progress extends ProgressBase {
return null;
}
[backgroundColorProperty.setNative](value: Color) {
let progressDrawable = this.nativeViewProtected.getProgressDrawable();
const progressDrawable = this.nativeViewProtected.getProgressDrawable();
if (!progressDrawable) {
return;
}
if (progressDrawable instanceof android.graphics.drawable.LayerDrawable && progressDrawable.getNumberOfLayers() > 0) {
let backgroundDrawable = progressDrawable.getDrawable(0);
const backgroundDrawable = progressDrawable.getDrawable(0);
if (backgroundDrawable) {
if (value instanceof Color) {
backgroundDrawable.setColorFilter(value.android, android.graphics.PorterDuff.Mode.SRC_IN);

View File

@@ -41,7 +41,7 @@ export class Progress extends ProgressBase {
return this.ios.trackTintColor;
}
[backgroundColorProperty.setNative](value: UIColor | Color) {
let color = value instanceof Color ? value.ios : value;
const color = value instanceof Color ? value.ios : value;
this.ios.trackTintColor = color;
}