@nativescript-community/ui-image 4.3.3 → 4.3.5
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 +16 -0
- package/index-common.d.ts +1 -0
- package/index.android.js +15 -4
- package/index.ios.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,22 @@
|
|
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.3.5](https://github.com/nativescript-community/ui-image/compare/v4.3.4...v4.3.5) (2022-09-29)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-image
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [4.3.4](https://github.com/nativescript-community/ui-image/compare/v4.3.3...v4.3.4) (2022-09-20)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @nativescript-community/ui-image
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
6
22
|
## [4.3.3](https://github.com/nativescript-community/ui-image/compare/v4.3.2...v4.3.3) (2022-09-12)
|
7
23
|
|
8
24
|
**Note:** Version bump only for package @nativescript-community/ui-image
|
package/index-common.d.ts
CHANGED
package/index.android.js
CHANGED
@@ -14,11 +14,23 @@ export function initialize(config) {
|
|
14
14
|
initializeConfig = config;
|
15
15
|
return;
|
16
16
|
}
|
17
|
-
|
18
|
-
|
17
|
+
let builder;
|
18
|
+
const useOkhttp = config === null || config === void 0 ? void 0 : config.useOkhttp;
|
19
|
+
if (useOkhttp) {
|
20
|
+
if (useOkhttp instanceof okhttp3.OkHttpClient) {
|
21
|
+
builder = com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory.newBuilder(context, useOkhttp);
|
22
|
+
}
|
23
|
+
else {
|
24
|
+
builder = com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory.newBuilder(context, new okhttp3.OkHttpClient());
|
25
|
+
}
|
26
|
+
}
|
27
|
+
else {
|
28
|
+
builder = com.facebook.imagepipeline.core.ImagePipelineConfig.newBuilder(context);
|
29
|
+
}
|
30
|
+
if (config === null || config === void 0 ? void 0 : config.isDownsampleEnabled) {
|
19
31
|
builder.setDownsampleEnabled(true);
|
20
32
|
}
|
21
|
-
if (config
|
33
|
+
if (config === null || config === void 0 ? void 0 : config.leakTracker) {
|
22
34
|
builder.setCloseableReferenceLeakTracker(config.leakTracker);
|
23
35
|
}
|
24
36
|
const imagePipelineConfig = builder.build();
|
@@ -541,7 +553,6 @@ export class Img extends ImageBase {
|
|
541
553
|
}
|
542
554
|
const controller = builder.build();
|
543
555
|
this.nativeImageViewProtected.setController(controller);
|
544
|
-
console.log('setController', this, src, uri);
|
545
556
|
}
|
546
557
|
else {
|
547
558
|
this.nativeImageViewProtected.setController(null);
|
package/index.ios.js
CHANGED
@@ -168,6 +168,9 @@ export class Img extends ImageBase {
|
|
168
168
|
this._imageSourceAffectsLayout = true;
|
169
169
|
this.handleImageLoaded = (image, error, cacheType) => {
|
170
170
|
this.isLoading = false;
|
171
|
+
if (!this.nativeViewProtected) {
|
172
|
+
return;
|
173
|
+
}
|
171
174
|
const animate = (this.alwaysFade || cacheType !== 2) && this.fadeDuration > 0;
|
172
175
|
if (image) {
|
173
176
|
this._setNativeImage(image, animate);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-image",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.5",
|
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": "./index",
|
6
6
|
"sideEffects": false,
|
@@ -44,5 +44,5 @@
|
|
44
44
|
},
|
45
45
|
"license": "Apache-2.0",
|
46
46
|
"readmeFilename": "README.md",
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "8e01d92bb19439fe14e45f384a5238cfa4fc90e8"
|
48
48
|
}
|