mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-26 09:13:33 +03:00
revert downgrade
This commit is contained in:
parent
7264adcda5
commit
28272c832f
@ -63,7 +63,7 @@
|
||||
"react-intl": "^3.9.2",
|
||||
"react-native": "0.61.5",
|
||||
"react-native-actionsheet": "ecency/react-native-actionsheet",
|
||||
"react-native-autoheight-webview": "1.4.1",
|
||||
"react-native-autoheight-webview": "^1.5.2",
|
||||
"react-native-config": "luggit/react-native-config#master",
|
||||
"react-native-dark-mode": "^0.2.2",
|
||||
"react-native-datepicker": "ecency/react-native-datepicker",
|
||||
|
@ -20,10 +20,10 @@ export const generateSignature = (media, privateKey) => {
|
||||
return key.sign(Buffer.from(array)).toString();
|
||||
};
|
||||
|
||||
export const catchEntryImage = (entry, width = 0, height = 0) => {
|
||||
export const catchEntryImage = (entry, width = 0, height = 0, format = 'match') => {
|
||||
// return from json metadata if exists
|
||||
let meta;
|
||||
const format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
|
||||
try {
|
||||
meta = JSON.parse(entry.json_metadata);
|
||||
@ -61,9 +61,9 @@ export const catchEntryImage = (entry, width = 0, height = 0) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export const catchDraftImage = (body) => {
|
||||
export const catchDraftImage = (body, format = 'match') => {
|
||||
const imgRegex = /(https?:\/\/.*\.(?:tiff?|jpe?g|gif|png|svg|ico|PNG|GIF|JPG))/g;
|
||||
const format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
|
||||
if (body && imgRegex.test(body)) {
|
||||
const imageMatch = body.match(imgRegex);
|
||||
@ -73,9 +73,9 @@ export const catchDraftImage = (body) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export const getResizedImage = (url, size = 600) => {
|
||||
export const getResizedImage = (url, size = 600, format = 'match') => {
|
||||
//TODO: implement fallback onError, for imagehoster is down case
|
||||
const format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
format = Platform.OS === 'android' ? 'webp' : 'match';
|
||||
if (!url) {
|
||||
return '';
|
||||
}
|
||||
|
@ -7461,14 +7461,7 @@ react-native-animatable@1.3.3:
|
||||
dependencies:
|
||||
prop-types "^15.7.2"
|
||||
|
||||
react-native-autoheight-webview@1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-autoheight-webview/-/react-native-autoheight-webview-1.4.1.tgz#be92b7be8a8691d60865e4ad6a8523ff4221207a"
|
||||
integrity sha512-mBx74NP7Sa6/8j46eDdm68z6Yw5YcvN3WkJNUHoCCJ36rQURFhSfhKm+aqbciqlXE8Jr5PrRA1oZSBeZzDb0bA==
|
||||
dependencies:
|
||||
prop-types "^15.7.2"
|
||||
|
||||
react-native-autoheight-webview@^1.3.4:
|
||||
react-native-autoheight-webview@^1.3.4, react-native-autoheight-webview@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-autoheight-webview/-/react-native-autoheight-webview-1.5.2.tgz#ea70cad056a2ce46e9de18cba90624aa49668632"
|
||||
integrity sha512-pgaLQ67wNE0VZOpvtCw7kbxJ4Cx38jgCjIOk3LfMf8uBxz+TP35QWGtSpf0NZ9sJifahU15t0Vd/8y/SGEUTCA==
|
||||
|
Loading…
Reference in New Issue
Block a user