mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: fix eslint issues (#9017)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user