@nativescript-community/ui-image 4.1.7 → 4.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/image.android.js +5 -1
- package/image.d.ts +2 -2
- package/image.ios.js +5 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [4.1.8](https://github.com/nativescript-community/ui-image/compare/v4.1.7...v4.1.8) (2022-07-01)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-image
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
6
14
|
## [4.1.7](https://github.com/nativescript-community/ui-image/compare/v4.1.6...v4.1.7) (2022-06-13)
|
7
15
|
|
8
16
|
|
package/image.android.js
CHANGED
@@ -337,9 +337,13 @@ export class Img extends ImageBase {
|
|
337
337
|
[_d = ImageBase.aspectRatioProperty.setNative]() {
|
338
338
|
this.initImage();
|
339
339
|
}
|
340
|
-
initImage() {
|
340
|
+
async initImage() {
|
341
341
|
if (this.nativeViewProtected) {
|
342
342
|
const src = this.src;
|
343
|
+
if (src instanceof Promise) {
|
344
|
+
this.src = await src;
|
345
|
+
return;
|
346
|
+
}
|
343
347
|
if (src) {
|
344
348
|
let drawable;
|
345
349
|
if (src instanceof ImageSource) {
|
package/image.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ImageSource, View } from '@nativescript/core';
|
1
|
+
import { ImageAsset, ImageSource, View } from '@nativescript/core';
|
2
2
|
|
3
3
|
|
4
4
|
/**
|
@@ -75,7 +75,7 @@ export class Img extends View {
|
|
75
75
|
/**
|
76
76
|
* String value used for the image URI.
|
77
77
|
*/
|
78
|
-
src: string | ImageSource;
|
78
|
+
src: string | ImageSource | ImageAsset | Promise<string | ImageSource | ImageAsset> ;
|
79
79
|
|
80
80
|
/**
|
81
81
|
* String value used for the lower res image URI.
|
package/image.ios.js
CHANGED
@@ -297,9 +297,13 @@ export class Img extends ImageBase {
|
|
297
297
|
}
|
298
298
|
return image;
|
299
299
|
}
|
300
|
-
initImage() {
|
300
|
+
async initImage() {
|
301
301
|
if (this.nativeViewProtected) {
|
302
302
|
const src = this.src;
|
303
|
+
if (src instanceof Promise) {
|
304
|
+
this.src = await src;
|
305
|
+
return;
|
306
|
+
}
|
303
307
|
if (src) {
|
304
308
|
const animate = this.fadeDuration > 0;
|
305
309
|
if (src instanceof ImageSource) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-image",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.8",
|
4
4
|
"description": "Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
|
5
5
|
"main": "./image",
|
6
6
|
"sideEffects": false,
|
@@ -36,5 +36,5 @@
|
|
36
36
|
},
|
37
37
|
"license": "Apache-2.0",
|
38
38
|
"readmeFilename": "README.md",
|
39
|
-
"gitHead": "
|
39
|
+
"gitHead": "41453b620cf3be6a305c67cfbd7e4cd2d1df8377"
|
40
40
|
}
|