muba-posting 4.0.6 → 4.0.7

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/Posting.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { BackHandler, Text, TouchableOpacity, View } from 'react-native';
3
- import { manipulateAsync } from 'expo-image-manipulator';
4
3
  import CustomScrollView from 'muba-custom-scroll-view';
5
4
  import { CommonActions } from '@react-navigation/native';
6
5
  import { loadLocaleData, currentLocale, strings } from 'muba-i18n';
@@ -340,14 +339,6 @@ export default class Posting extends React.Component {
340
339
  let i = 0;
341
340
  for (let imageObject of this.state.postingAd.images) {
342
341
  if (imageObject.photo.url) {
343
- if (imageObject.photo.extension === 'heic' || imageObject.photo.extension === 'heif') {
344
- const manipResult = await manipulateAsync(
345
- imageObject.photo.url.uri, [], {}
346
- );
347
-
348
- imageObject.photo.url.uri = manipResult.uri;
349
- }
350
-
351
342
  formData.append('photo' + i, {
352
343
  uri: imageObject.photo.url.uri,
353
344
  name: imageObject.photo.fileName ? imageObject.photo.fileName : 'photo_' + i + '.' + imageObject.photo.extension,
@@ -421,7 +412,7 @@ export default class Posting extends React.Component {
421
412
  await this.setState({ showImageBrowser: false });
422
413
 
423
414
  for (let photo of photos) {
424
- this.publish4Screen.loadImage(photo.uri);
415
+ this.publish4Screen.loadImage(photo);
425
416
  }
426
417
  }
427
418
 
@@ -436,7 +427,7 @@ export default class Posting extends React.Component {
436
427
  _savePicture = async (picture) => {
437
428
  await this.setState({ showImageBrowser: false })
438
429
  this.setState({ view: Views.PUBLISH_4 }, () => {
439
- this.publish4Screen.loadImage(picture.uri);
430
+ this.publish4Screen.loadImage(picture);
440
431
  })
441
432
  }
442
433
 
package/Publish4.js CHANGED
@@ -3,7 +3,6 @@ import { Text, View, TouchableHighlight, TouchableOpacity, ImageBackground, Dime
3
3
  import PopupAdvice from 'muba-popup-advice';
4
4
  import { strings } from 'muba-i18n';
5
5
  import commonStyles from './commonStyles';
6
- import { canOpenCamera } from './utils/Common.js';
7
6
  import { Views } from './utils/Views';
8
7
  import { createIconSetFromFontello } from 'react-native-vector-icons';
9
8
  import fontelloConfig from './fonts/config.json';
@@ -47,11 +46,13 @@ export default class Publish4 extends React.Component {
47
46
 
48
47
  async loadImage(imgUri) {
49
48
  if (imgUri) {
49
+ let extension = imgUri.substring(imgUri.lastIndexOf('.') + 1).toLowerCase();
50
+
50
51
  const image = {
51
52
  photo: {
52
53
  id: 0,
53
54
  url: { uri: imgUri },
54
- extension: imgUri.substring(imgUri.lastIndexOf('.') + 1)
55
+ extension: extension
55
56
  }
56
57
  }
57
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {
@@ -18,7 +18,6 @@
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": "~10.2.0",
22
21
  "muba-custom-scroll-view": "4",
23
22
  "muba-display-price": "4",
24
23
  "muba-font": "4",