File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/default-notification-body Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ class DefaultNotificationBody extends React.Component {
4444 this . onSwipe = this . onSwipe . bind ( this ) ;
4545 }
4646
47- componentWillReceiveProps ( nextProps ) {
48- if ( ( this . props . vibrate || nextProps . vibrate ) && nextProps . isOpen && ! this . props . isOpen ) {
47+ componentDidUpdate ( prevProps ) {
48+ if ( ( prevProps . vibrate || this . props . vibrate ) && this . props . isOpen && ! prevProps . isOpen ) {
4949 Vibration . vibrate ( ) ;
5050 }
5151 }
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ class DefaultNotificationBody extends React.Component {
6565 this . onSwipe = this . onSwipe . bind ( this ) ;
6666 }
6767
68- componentWillReceiveProps ( nextProps ) {
69- if ( nextProps . isOpen !== this . props . isOpen ) {
70- StatusBar . setHidden ( nextProps . isOpen ) ;
68+ componentDidUpdate ( prevProps ) {
69+ if ( this . props . isOpen !== prevProps . isOpen ) {
70+ StatusBar . setHidden ( this . props . isOpen ) ;
7171 }
7272
73- if ( ( this . props . vibrate || nextProps . vibrate ) && nextProps . isOpen && ! this . props . isOpen ) {
73+ if ( ( prevProps . vibrate || this . props . vibrate ) && this . props . isOpen && ! prevProps . isOpen ) {
7474 Vibration . vibrate ( ) ;
7575 }
7676 }
You can’t perform that action at this time.
0 commit comments