Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["react-native"],
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]],
"env": {
"production": {
Expand Down
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

e2e-test:
macos:
xcode: "9.0"
xcode: "10.0.0"

environment:
BASH_ENV: "~/.nvm/nvm.sh"
Expand Down Expand Up @@ -87,7 +87,8 @@ jobs:
- image: circleci/android:api-27-node8-alpha

environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
# GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
GRADLE_OPTS: -Xmx2048m -Dorg.gradle.daemon=false
JVM_OPTS: -Xmx4096m
TERM: dumb
BASH_ENV: "~/.nvm/nvm.sh"
Expand Down Expand Up @@ -170,7 +171,7 @@ jobs:

ios-build:
macos:
xcode: "9.0"
xcode: "10.0.0"

environment:
BASH_ENV: "~/.nvm/nvm.sh"
Expand Down Expand Up @@ -236,7 +237,7 @@ jobs:

ios-testflight:
macos:
xcode: "9.0"
xcode: "10.0.0"

steps:
- checkout
Expand Down
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = {
"ecmaVersion": 2017,
"ecmaFeatures": {
"experimentalObjectRestSpread" : true,
"jsx": true
"jsx": true,
"legacyDecorators": true
}
},
"plugins": [
Expand Down Expand Up @@ -65,6 +66,7 @@ module.exports = {
"no-dupe-args": 2,
"no-dupe-class-members": 2,
"no-duplicate-case": 2,
"no-else-return": [0, {allowElseIf: true}],
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
Expand Down Expand Up @@ -125,7 +127,8 @@ module.exports = {
"object-shorthand": 2,
"consistent-return": 0,
"global-require": "off",
"react-native/no-unused-styles": 2
"react-native/no-unused-styles": 2,
"react/jsx-one-expression-per-line": 0
},
"globals": {
"__DEV__": true
Expand Down
6 changes: 0 additions & 6 deletions __tests__/__snapshots__/RoomItem.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exports[`render channel 1`] = `
<View>
<View
accessibilityLabel="general, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -200,7 +199,6 @@ exports[`render no icon 1`] = `
<View>
<View
accessibilityLabel="name, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -396,7 +394,6 @@ exports[`render private group 1`] = `
<View>
<View
accessibilityLabel="private-group, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -593,7 +590,6 @@ exports[`render unread +999 1`] = `
<View>
<View
accessibilityLabel="name, 1000 alerts, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -856,7 +852,6 @@ exports[`render unread 1`] = `
<View>
<View
accessibilityLabel="name, 1 alert, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -1119,7 +1114,6 @@ exports[`renders correctly 1`] = `
<View>
<View
accessibilityLabel="name, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down
11 changes: 0 additions & 11 deletions __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
<View>
<View
accessibilityLabel="rocket.cat, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -532,7 +531,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="rocket.cat, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -768,7 +766,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="rocket.cat, 1 alert, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -1026,7 +1023,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, 9 alerts, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -1288,7 +1284,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, 99 alerts, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -1546,7 +1541,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, 100 alerts, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -1804,7 +1798,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, 100000 alerts, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -2062,7 +2055,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, 100000 alerts, you were mentioned, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -2320,7 +2312,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="W, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -2552,7 +2543,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel="WW, last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down Expand Up @@ -2784,7 +2774,6 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
</View>
<View
accessibilityLabel=", last message Nov 10"
accessibilityTraits="selected"
accessible={true}
isTVSelectable={true}
onResponderGrant={[Function]}
Expand Down
17 changes: 8 additions & 9 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,23 @@ dependencies {
implementation project(':react-native-audio')
implementation project(":reactnativekeyboardinput")
implementation project(':react-native-video')
implementation project(':react-native-svg')
implementation project(':react-native-vector-icons')
implementation project(':rn-fetch-blob')
implementation project(':react-native-zeroconf')
implementation project(':@remobile/react-native-toast')
implementation project(':react-native-fast-image')
implementation project(':realm')
implementation project(':react-native-navigation')
implementation project(':reactnativenotifications')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.1.0"
implementation "com.android.support:support-v4:27.1.+"
implementation 'com.android.support:customtabs:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation "com.android.support:appcompat-v7:27.1.1"
implementation "com.android.support:support-v4:27.1.1"
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.fresco:animated-gif:1.9.0'
implementation 'com.facebook.fresco:animated-webp:1.9.0'
implementation 'com.facebook.fresco:webpsupport:1.9.0'
implementation 'com.facebook.fresco:fresco:1.10.0'
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation 'com.facebook.fresco:animated-webp:1.10.0'
implementation 'com.facebook.fresco:webpsupport:1.10.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
transitive = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import com.AlexanderZaytsev.RNI18n.RNI18nPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.balthazargronon.RCTZeroconf.ZeroconfReactPackage;
import com.brentvatne.react.ReactVideoPackage;
import com.crashlytics.android.Crashlytics;
import com.dylanvann.fastimage.FastImageViewPackage;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.horcrux.svg.SvgPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.reactnativenavigation.NavigationApplication;
import com.remobile.toast.RCTToastPackage;
Expand Down Expand Up @@ -62,10 +60,8 @@ public List<ReactPackage> createAdditionalReactPackages() {
new RNDeviceInfo(),
new RNGestureHandlerPackage(),
new PickerPackage(),
new SvgPackage(),
new VectorIconsPackage(),
new RNFetchBlobPackage(),
new ZeroconfReactPackage(),
new RealmReactPackage(),
new ReactVideoPackage(),
new RCTToastPackage(),
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ include ':reactnativekeyboardinput'
project(':reactnativekeyboardinput').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keyboard-input/lib/android')
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-zeroconf'
project(':react-native-zeroconf').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zeroconf/android')
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-navigation'
Expand Down
17 changes: 11 additions & 6 deletions app/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ class NavigationActionsClass {
this.navigator = navigator;
}

push = params => this.navigator && this.navigator.push(params);
pop = params => this.navigator && this.navigator.pop(params);
popToRoot = params => this.navigator && this.navigator.popToRoot(params);
resetTo = params => this.navigator && this.navigator.resetTo(params);
toggleDrawer = params => this.navigator && this.navigator.toggleDrawer(params);
dismissModal = params => this.navigator && this.navigator.dismissModal(params);
push = params => this.navigator && this.navigator.push(params)

pop = params => this.navigator && this.navigator.pop(params)

popToRoot = params => this.navigator && this.navigator.popToRoot(params)

resetTo = params => this.navigator && this.navigator.resetTo(params)

toggleDrawer = params => this.navigator && this.navigator.toggleDrawer(params)

dismissModal = params => this.navigator && this.navigator.dismissModal(params)
}

export const NavigationActions = new NavigationActionsClass();
1 change: 0 additions & 1 deletion app/actions/actionsTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,3 @@ export const SORT_PREFERENCES = createRequestTypes('SORT_PREFERENCES', ['SET_ALL

export const INCREMENT = 'INCREMENT';
export const DECREMENT = 'DECREMENT';

1 change: 0 additions & 1 deletion app/actions/selectedUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export function setLoading(loading) {
loading
};
}

29 changes: 21 additions & 8 deletions app/animations/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default class Panel extends React.Component {
children: PropTypes.node.isRequired,
style: PropTypes.object
}

constructor(props) {
super(props);
this.state = {
Expand All @@ -18,15 +19,22 @@ export default class Panel extends React.Component {
this.open = false;
this.opacity = 0;
}

componentDidMount() {
const initialValue = !this.props.open ? this.height : 0;
this.state.animation.setValue(initialValue);
const { animation } = this.state;
const { open } = this.props;
const initialValue = !open ? this.height : 0;
animation.setValue(initialValue);
}

componentWillReceiveProps(nextProps) {
const { animation } = this.state;
const { open } = this.props;

if (this.first) {
this.first = false;
if (!this.props.open) {
this.state.animation.setValue(0);
if (!open) {
animation.setValue(0);
return;
}
}
Expand All @@ -37,26 +45,31 @@ export default class Panel extends React.Component {
const initialValue = !nextProps.open ? this.height : 0;
const finalValue = !nextProps.open ? 0 : this.height;

this.state.animation.setValue(initialValue);
animation.setValue(initialValue);
Animated.timing(
this.state.animation,
animation,
{
toValue: finalValue,
duration: 150,
useNativeDriver: true
}
).start();
}

set _height(h) {
this.height = h || this.height;
}

render() {
const { animation } = this.state;
const { style, children } = this.props;

return (
<Animated.View
style={[{ height: this.state.animation }, this.props.style]}
style={[{ height: animation }, style]}
>
<View onLayout={({ nativeEvent }) => this._height = nativeEvent.layout.height} style={{ position: !this.first ? 'relative' : 'absolute' }}>
{this.props.children}
{children}
</View>
</Animated.View>
);
Expand Down
Loading