[NEW] Use community JSC for Android (#450)

* [NEW] Use community JSC for Android

* Quick fix on unread chats
This commit is contained in:
Diego Mello 2018-09-19 14:08:41 -03:00 committed by GitHub
parent 062bbb2b87
commit 46f155d728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 32 deletions

View File

@ -183,6 +183,12 @@ repositories {
maven { url 'https://maven.fabric.io/public' }
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r224109'
}
}
dependencies {
implementation project(':react-native-device-info')
implementation project(':react-native-gesture-handler')

View File

@ -30,6 +30,10 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Local Maven repo containing AARs with JSC library built for Android
url "$rootDir/../node_modules/jsc-android/dist"
}
}
}

View File

@ -241,7 +241,11 @@ export default class RoomsListView extends LoggedView {
this.removeListener(this.chats);
} else {
// chats
this.chats = this.data.filtered('(unread == 0 && alert == false)');
if (this.props.showUnread) {
this.chats = this.data.filtered('(unread == 0 && alert == false)');
} else {
this.chats = this.data;
}
chats = this.chats.slice();
setTimeout(() => {
this.chats.addListener(() => this.setState({ chats: this.chats.slice() }));

View File

@ -1,6 +1,3 @@
import '@babel/polyfill';
import 'regenerator-runtime/runtime';
import './app/ReactotronConfig';
import './app/push';
import App from './app/index';

31
package-lock.json generated
View File

@ -780,27 +780,6 @@
}
}
},
"@babel/polyfill": {
"version": "7.0.0-beta.47",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.0.0-beta.47.tgz",
"integrity": "sha512-jDKBjX1K/fUNrPGo3wDKEWIXDHZEgpsKTRo3B4Ox5cq5Hxcp219ez/oGofDjNMUJAUI+gfsQfRarMkC5f3uiYw==",
"requires": {
"core-js": "^2.5.3",
"regenerator-runtime": "^0.11.1"
},
"dependencies": {
"core-js": {
"version": "2.5.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
"integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw=="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
}
}
},
"@babel/register": {
"version": "7.0.0-beta.47",
"resolved": "https://registry.npmjs.org/@babel/register/-/register-7.0.0-beta.47.tgz",
@ -11451,6 +11430,11 @@
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"optional": true
},
"jsc-android": {
"version": "224109.1.0",
"resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-224109.1.0.tgz",
"integrity": "sha512-mhALFynePc/wJsUt9BJuH13mSK/dGWtBO/pcYwVV1I0A7iduyqy3fSoAt1b0yI+/B3TzlGyue/gqjPxsqG1HRQ=="
},
"jsdom": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz",
@ -16670,11 +16654,6 @@
}
}
},
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
"integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg=="
},
"regenerator-transform": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",

View File

@ -23,7 +23,6 @@
]
},
"dependencies": {
"@babel/polyfill": "^7.0.0-beta.47",
"@remobile/react-native-toast": "^1.0.7",
"@storybook/addons": "^3.4.10",
"@storybook/react-native": "^3.4.10",
@ -31,6 +30,7 @@
"ejson": "^2.1.2",
"js-base64": "^2.4.8",
"js-sha256": "^0.9.0",
"jsc-android": "^224109.1.0",
"lodash": "^4.17.10",
"markdown-it-flowdock": "^0.3.7",
"moment": "^2.22.2",
@ -75,7 +75,6 @@
"redux-enhancer-react-native-appstate": "^0.3.1",
"redux-immutable-state-invariant": "^2.1.0",
"redux-saga": "^0.16.0",
"regenerator-runtime": "^0.12.1",
"rn-fetch-blob": "^0.10.12",
"snyk": "^1.90.0",
"strip-ansi": "^4.0.0"