muba-posting 3.0.11 → 3.0.12

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.
Files changed (2) hide show
  1. package/Posting.js +9 -0
  2. package/package.json +2 -1
package/Posting.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BackHandler, Text, TouchableOpacity, View } from 'react-native';
3
+ import { manipulateAsync } from 'expo-image-manipulator';
3
4
  import CustomScrollView from 'muba-custom-scroll-view';
4
5
  import { CommonActions } from '@react-navigation/native';
5
6
  import { loadLocaleData, currentLocale, strings } from 'muba-i18n';
@@ -336,6 +337,14 @@ export default class Posting extends React.Component {
336
337
  let i = 0;
337
338
  for (let imageObject of this.state.postingAd.images) {
338
339
  if (imageObject.photo.url) {
340
+ if (imageObject.photo.extension === 'heic' || imageObject.photo.extension === 'heif') {
341
+ const manipResult = await manipulateAsync(
342
+ imageObject.photo.url.uri, [], {}
343
+ );
344
+
345
+ imageObject.photo.url.uri = manipResult.uri;
346
+ }
347
+
339
348
  formData.append('photo' + i, {
340
349
  uri: imageObject.photo.url.uri,
341
350
  name: imageObject.photo.fileName ? imageObject.photo.fileName : 'photo_' + i + '.' + imageObject.photo.extension,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {
@@ -18,6 +18,7 @@
18
18
  "homepage": "https://github.com/Mubawab/muba-posting#readme",
19
19
  "dependencies": {
20
20
  "@react-native-async-storage/async-storage": "~1.15.0",
21
+ "expo-image-manipulator": "~9.2.2",
21
22
  "muba-custom-scroll-view": "3",
22
23
  "muba-display-price": "3",
23
24
  "muba-font": "3",