muba-posting 3.0.11 → 4.0.0

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 +14 -0
  2. package/package.json +16 -15
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';
@@ -60,6 +61,7 @@ export default class Posting extends React.Component {
60
61
  adId: this.props.adId,
61
62
  maxPictures: 0,
62
63
  countryPhone: '',
64
+ picturesUploaded: 0,
63
65
  postingAd: {
64
66
  category: null,
65
67
  subCategory: null,
@@ -336,6 +338,14 @@ export default class Posting extends React.Component {
336
338
  let i = 0;
337
339
  for (let imageObject of this.state.postingAd.images) {
338
340
  if (imageObject.photo.url) {
341
+ if (imageObject.photo.extension === 'heic' || imageObject.photo.extension === 'heif') {
342
+ const manipResult = await manipulateAsync(
343
+ imageObject.photo.url.uri, [], {}
344
+ );
345
+
346
+ imageObject.photo.url.uri = manipResult.uri;
347
+ }
348
+
339
349
  formData.append('photo' + i, {
340
350
  uri: imageObject.photo.url.uri,
341
351
  name: imageObject.photo.fileName ? imageObject.photo.fileName : 'photo_' + i + '.' + imageObject.photo.extension,
@@ -370,6 +380,10 @@ export default class Posting extends React.Component {
370
380
  await this.setState({ postingAd: { ...this.state.postingAd, adId: responseJson.adId } });
371
381
  this._goToPage(Views.PREVIEW, null, responseJson);
372
382
  }
383
+
384
+ if (this.props.showRatingPopup) {
385
+ this.props.showRatingPopup();
386
+ }
373
387
  }
374
388
  });
375
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "3.0.11",
3
+ "version": "4.0.0",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {
@@ -18,19 +18,20 @@
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
- "muba-custom-scroll-view": "3",
22
- "muba-display-price": "3",
23
- "muba-font": "3",
24
- "muba-i18n": "3",
25
- "muba-input-select": "3",
26
- "muba-input-text": "3",
27
- "muba-loading-cursor": "3",
28
- "muba-map": "3",
29
- "muba-output-text": "3",
30
- "muba-phone-group": "3",
31
- "muba-picture": "3",
32
- "muba-popup-advice": "3",
33
- "muba-popup-permissions": "3",
34
- "muba-radio-button-group": "3"
21
+ "expo-image-manipulator": "~10.2.0",
22
+ "muba-custom-scroll-view": "4",
23
+ "muba-display-price": "4",
24
+ "muba-font": "4",
25
+ "muba-i18n": "4",
26
+ "muba-input-select": "4",
27
+ "muba-input-text": "4",
28
+ "muba-loading-cursor": "4",
29
+ "muba-map": "4",
30
+ "muba-output-text": "4",
31
+ "muba-phone-group": "4",
32
+ "muba-picture": "4",
33
+ "muba-popup-advice": "4",
34
+ "muba-popup-permissions": "4",
35
+ "muba-radio-button-group": "4"
35
36
  }
36
37
  }