Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Improves #245

Merged
merged 24 commits into from
Mar 2, 2018
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

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

environment:
BASH_ENV: "~/.nvm/nvm.sh"
Expand Down
54 changes: 6 additions & 48 deletions __tests__/__snapshots__/RoomItem.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ exports[`render channel 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -185,14 +178,7 @@ exports[`render no icon 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -352,14 +338,7 @@ exports[`render private group 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -520,14 +499,7 @@ exports[`render unread +999 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -721,14 +693,7 @@ exports[`render unread 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -922,14 +887,7 @@ exports[`renders correctly 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down
99 changes: 11 additions & 88 deletions __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -343,14 +336,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -520,14 +506,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -716,14 +695,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -916,14 +888,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -1112,14 +1077,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -1308,14 +1266,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -1504,14 +1455,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -1700,14 +1644,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -1873,14 +1810,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down Expand Up @@ -2046,14 +1976,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"backgroundColor": "transparent",
},
undefined,
]
}
style={null}
testID={undefined}
tvParallaxProperties={undefined}
>
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# org.gradle.parallel=true

android.useDeprecatedNdk=true
# VERSIONCODE=999999999
VERSIONCODE=999999999
8 changes: 4 additions & 4 deletions app/animations/fade.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ export default class Fade extends React.Component {
};
}

componentWillMount() {
this._visibility = new Animated.Value(this.props.visible ? 1 : 0);
}

componentWillReceiveProps(nextProps) {
if (nextProps.visible) {
this.setState({ visible: true });
Expand All @@ -36,6 +32,10 @@ export default class Fade extends React.Component {
});
}

UNSAFE_componentWillMount() {
this._visibility = new Animated.Value(this.props.visible ? 1 : 0);
}

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

Expand Down
7 changes: 4 additions & 3 deletions app/containers/EmojiPicker/EmojiCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ export default class EmojiCategory extends React.Component {
this.size = Math.min(this.props.width || width, height) / (this.props.emojisPerRow || emojisPerRow);
this.emojis = [];
}
componentWillMount() {
this.emojis = this.props.emojis;
}

shouldComponentUpdate() {
return false;
}

UNSAFE_componentWillMount() {
this.emojis = this.props.emojis;
}

renderItem(emoji, size) {
return (
<TouchableOpacity
Expand Down
15 changes: 8 additions & 7 deletions app/containers/EmojiPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ export default class EmojiPicker extends Component {
// return false;
// }

componentWillMount() {
this.frequentlyUsed.addListener(this.updateFrequentlyUsed);
this.customEmojis.addListener(this.updateCustomEmojis);
this.updateFrequentlyUsed();
this.updateCustomEmojis();
}
componentDidMount() {
requestAnimationFrame(() => this.setState({ show: true }));
}
Expand All @@ -69,6 +63,14 @@ export default class EmojiPicker extends Component {
this.props.onEmojiSelected(emojify(shortname, { output: 'unicode' }), shortname);
}
}

UNSAFE_componentWillMount() {
this.frequentlyUsed.addListener(this.updateFrequentlyUsed);
this.customEmojis.addListener(this.updateCustomEmojis);
this.updateFrequentlyUsed();
this.updateCustomEmojis();
}

_addFrequentlyUsed = (emoji) => {
database.write(() => {
database.create('frequentlyUsedEmoji', emoji, true);
Expand Down Expand Up @@ -123,7 +125,6 @@ export default class EmojiPicker extends Component {
<ScrollableTabView
renderTabBar={() => <TabBar tabEmojiStyle={this.props.tabEmojiStyle} />}
contentProps={scrollProps}
// prerenderingSiblingsNumber={1}
>
{
categories.tabs.map((tab, i) => (
Expand Down
Loading