Fix bugs reported by sentry (#1081)
This commit is contained in:
parent
0210d6e1eb
commit
1a12abfe50
3 changed files with 6 additions and 7 deletions
|
|
@ -21,13 +21,13 @@ export default class Drawer extends BaseDrawer {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
|
||||
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
|
||||
Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
|
||||
Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.keyboardDidShowListener.remove();
|
||||
this.keyboardDidHideListener.remove();
|
||||
Keyboard.removeListener('keyboardDidShow', this.keyboardDidShow);
|
||||
Keyboard.removeListener('keyboardDidHide', this.keyboardDidHide);
|
||||
}
|
||||
|
||||
getMainHeight = () => '100%';
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ function mapStateToProps(state, ownProps) {
|
|||
return {
|
||||
theme: ownProps.theme || getTheme(state),
|
||||
status,
|
||||
user,
|
||||
...ownProps
|
||||
user
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function mapStateToProps(state) {
|
|||
const currentUserId = getCurrentUserId(state);
|
||||
const favoriteChannels = getSortedFavoriteChannelIds(state);
|
||||
const isCurrent = currentChannel.id === state.entities.channels.currentChannelId;
|
||||
const isFavorite = favoriteChannels.indexOf(currentChannel.id) > -1;
|
||||
const isFavorite = favoriteChannels && favoriteChannels.indexOf(currentChannel.id) > -1;
|
||||
const roles = getCurrentUserRoles(state);
|
||||
const canManageUsers = currentChannel.hasOwnProperty('id') ? canManageChannelMembers(state) : false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue