muba-posting 3.0.10 → 3.0.14
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/PopupSpendProduct.js +1 -0
- package/Posting.js +15 -0
- package/package.json +2 -1
package/PopupSpendProduct.js
CHANGED
|
@@ -8,6 +8,7 @@ import { strings } from 'muba-i18n';
|
|
|
8
8
|
import commonStyles from './commonStyles';
|
|
9
9
|
|
|
10
10
|
export const PROMOTE_AD = '/api/posting/PromoteAd';
|
|
11
|
+
const GET_COUNTRY_PHONE = '/api/common/GetCountryPhone';
|
|
11
12
|
|
|
12
13
|
export default class PopupSpendProduct extends React.Component {
|
|
13
14
|
constructor(props) {
|
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';
|
|
@@ -31,6 +32,7 @@ const SET_AD = '/api/posting/SetAd';
|
|
|
31
32
|
const GET_AD = '/api/posting/GetPostingAd';
|
|
32
33
|
const GET_BUSINESS_PRODUCTS = '/api/posting/GetBusinessProducts';
|
|
33
34
|
const GET_MAX_PICTURES = '/api/posting/GetMaxPictures';
|
|
35
|
+
const GET_COUNTRY_PHONE = '/api/common/GetCountryPhone';
|
|
34
36
|
|
|
35
37
|
export default class Posting extends React.Component {
|
|
36
38
|
constructor(props) {
|
|
@@ -59,6 +61,7 @@ export default class Posting extends React.Component {
|
|
|
59
61
|
adId: this.props.adId,
|
|
60
62
|
maxPictures: 0,
|
|
61
63
|
countryPhone: '',
|
|
64
|
+
picturesUploaded: 0,
|
|
62
65
|
postingAd: {
|
|
63
66
|
category: null,
|
|
64
67
|
subCategory: null,
|
|
@@ -335,6 +338,14 @@ export default class Posting extends React.Component {
|
|
|
335
338
|
let i = 0;
|
|
336
339
|
for (let imageObject of this.state.postingAd.images) {
|
|
337
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
|
+
|
|
338
349
|
formData.append('photo' + i, {
|
|
339
350
|
uri: imageObject.photo.url.uri,
|
|
340
351
|
name: imageObject.photo.fileName ? imageObject.photo.fileName : 'photo_' + i + '.' + imageObject.photo.extension,
|
|
@@ -369,6 +380,10 @@ export default class Posting extends React.Component {
|
|
|
369
380
|
await this.setState({ postingAd: { ...this.state.postingAd, adId: responseJson.adId } });
|
|
370
381
|
this._goToPage(Views.PREVIEW, null, responseJson);
|
|
371
382
|
}
|
|
383
|
+
|
|
384
|
+
if (this.props.showRatingPopup) {
|
|
385
|
+
this.props.showRatingPopup();
|
|
386
|
+
}
|
|
372
387
|
}
|
|
373
388
|
});
|
|
374
389
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muba-posting",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.14",
|
|
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",
|