mattermost-mobile/app/components/post_attachment_opengraph
Rahim Rahman e0d2fba243
[MM-18766] remove deprecated lifecycle methods from post components (#4270)
* [MM-18766] removed deprecated lifecycle methods from post components

* [MM-18766] update snapshot, seems like there was a bug

* [MM-18766] refactor getBestImageUrl -> getBestImageUrlAndDimensions

- refactor getBestImageUrl to take a single argument: props
- refactor getViewPostWidth to take a single argument: props

* [MM-18766] getDerivedStateFromProps was previously returning only first prop change

- fix issue if multiple props were modified at once.

* [MM-18766] removed FastImage.preload that was supposed to be removed in the last merge.

* [MM-18766] removed getDerivedStateFromProps

* [MM-18766] fix tests based on actual component being completely re-rendered rather than prop change.

* [MM-18766] cleaning up initial changes due to no longer using getDerivedStateFromProps method

- move back getBestImageUrl and getViewPostWidth from outside of components
- keep the renaming of getBestImageUrl
- remove the use of spread operator as it is also no longer needed

* [MM-18766] one of caller to getViewPostWidth is still passing this.props

- this is no longer needed
2020-06-15 10:11:21 -07:00
..
__snapshots__ [MM-18766] remove deprecated lifecycle methods from post components (#4270) 2020-06-15 10:11:21 -07:00
index.js [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
post_attachment_opengraph.js [MM-18766] remove deprecated lifecycle methods from post components (#4270) 2020-06-15 10:11:21 -07:00
post_attachment_opengraph.test.js [MM-18766] remove deprecated lifecycle methods from post components (#4270) 2020-06-15 10:11:21 -07:00