muba-posting 4.1.29 → 4.2.1

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
@@ -302,7 +302,6 @@ export default class Posting extends React.Component {
302
302
 
303
303
  if (this.state.fullPosting && this.state.postingAd.town && Views.PUBLISH_6 !== this.state.view && Views.PAYMENT_ONLINE !== view) {
304
304
  const ad = { ...this.state.postingAd };
305
- console.log(ad)
306
305
  if (Views.PUBLISH_4 !== this.state.view) {
307
306
  delete ad.images;
308
307
  }
package/Preview.js CHANGED
@@ -9,6 +9,8 @@ import fontelloConfig from './fonts/config.json';
9
9
  const FontAwesomeIcon = createIconSetFromFontello(fontelloConfig);
10
10
  const window = Dimensions.get('window');
11
11
 
12
+ const PAYMENT_ONLINE_ACTIVE = { method: 'GET', url: '/controller/payments-online/{countryCode}/active' };
13
+
12
14
  export default class Preview extends React.Component {
13
15
  constructor(props) {
14
16
  super(props);
@@ -22,12 +24,14 @@ export default class Preview extends React.Component {
22
24
  }
23
25
  }
24
26
 
25
- componentDidMount = () => {
27
+ componentDidMount = async () => {
26
28
  const componentsHeight = this.props.headerHeight + this.props.progressBarHeight + (StatusBar.currentHeight ? StatusBar.currentHeight : 0);
27
29
  const minHeight = window.height - componentsHeight;
28
30
  if (this.state.minHeight != minHeight) {
29
31
  this.setState({ minHeight: minHeight })
30
32
  }
33
+ const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.regionId });
34
+ console.log(paymentOnlineActive)
31
35
  this.refreshData();
32
36
  }
33
37
 
package/Publish4.js CHANGED
@@ -14,7 +14,7 @@ export default class Publish4 extends React.Component {
14
14
  super(props);
15
15
 
16
16
  this.state = {
17
- images: this.props.postingAd.images,
17
+ images: [],
18
18
  popupSelectPhotoVisible: false,
19
19
  showErrorNoSelectedImages: false,
20
20
  allPhotosSelected: false,
@@ -38,9 +38,11 @@ export default class Publish4 extends React.Component {
38
38
 
39
39
  componentDidUpdate = async (prevProps) => {
40
40
  if (!this.isSameList(prevProps.images, this.props.images)) {
41
- for (let photo of this.props.images) {
42
- this.loadImage(photo);
43
- }
41
+ this.setState({ images: [] }, () => {
42
+ for (let photo of this.props.images) {
43
+ this.loadImage(photo);
44
+ }
45
+ });
44
46
  }
45
47
  }
46
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "4.1.29",
3
+ "version": "4.2.1",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {
@@ -17,13 +17,13 @@
17
17
  },
18
18
  "homepage": "https://github.com/Mubawab/muba-posting#readme",
19
19
  "dependencies": {
20
- "@react-native-async-storage/async-storage": "~1.15.0",
20
+ "@react-native-async-storage/async-storage": "~1.17.3",
21
21
  "muba-custom-scroll-view": "4",
22
22
  "muba-display-price": "4",
23
23
  "muba-font": "4",
24
24
  "muba-i18n": "4",
25
25
  "muba-input-select": "4",
26
- "muba-input-text": "4.1.2",
26
+ "muba-input-text": "4",
27
27
  "muba-loading-cursor": "4",
28
28
  "muba-map": "4",
29
29
  "muba-output-text": "4",