Skip to content

Commit

Permalink
Merge pull request Anthonyzou#5 from Ivshti/master
Browse files Browse the repository at this point in the history
fix lodash dependency
  • Loading branch information
Anthonyzou authored Oct 11, 2016
2 parents f038430 + 384b2ba commit e82ceea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import {
const FullScreen = NativeModules.FullScreen
export default FullScreen;

import _ from 'lodash';
import debounce from 'debounce';

export class ToggleView extends Component {
constructor(props,context){
super(props,context)
this.state = {
focus:this.props.focus||true
}
this.offFullScreen = _.debounce(FullScreen.offFullScreen,250);
this.delayHide = _.debounce(() => {
this.offFullScreen = debounce(FullScreen.offFullScreen,250);
this.delayHide = debounce(() => {
FullScreen.onFullScreen();
this.setState({focus:false});
},this.props.delay || 3000);
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
"bugs": {
"url": "https://github.com/Anthonyzou/react-native-full-screen/issues"
},
"homepage": "https://github.com/Anthonyzou/react-native-full-screen#readme"
"homepage": "https://github.com/Anthonyzou/react-native-full-screen#readme",
"dependencies": {
"debounce": "^1.0.0"
}
}

0 comments on commit e82ceea

Please sign in to comment.