mattermost-mobile/app/components/drawer.js
Harrison Healey cea81f6497 Reorganized navigation (#181)
* Moved ChannelDrawer into its own scene

* Moved RightSideMenu to a separate route

* Moved title back above scenes

* Moved right side menu into a separate scene

* Reorganized navigation so that it centers around ChannelView when logged in

* Stopped using NavigationExperimental to manage drawers

* Fixed copyright date

* Added unit tests for navigation drawers

* Renamed RightSideMenu to RightMenuDrawer

* Removed unnecessary ChannelDrawer style
2017-01-24 11:56:35 -03:00

29 lines
907 B
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import BaseDrawer from 'react-native-drawer';
// Extends react-native-drawer to allow better control over the open/closed state from the parent
export default class Drawer extends BaseDrawer {
static propTypes = {
...BaseDrawer.propTypes,
onRequestClose: React.PropTypes.func.isRequired
};
processTapGestures = () => {
// Note that we explicitly don't support tap to open or double tap because I didn't copy them over
if (this._activeTween) { // eslint-disable-line no-underscore-dangle
return false;
}
if (this.props.tapToClose && this._open) { // eslint-disable-line no-underscore-dangle
this.props.onRequestClose();
return true;
}
return false;
};
}