Skip to content

Commit 3d6254b

Browse files
committed
Fix the listener to handle 'background' status instead of 'inactive'.
1 parent b7cffdd commit 3d6254b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class Countdown extends PureComponent {
110110
};
111111

112112
handleAppState = nextAppState => {
113-
if (nextAppState === 'inactive') {
113+
if (nextAppState === 'background') {
114114
this.recodTime = new Date();
115115
this.clearTimer();
116116
} else if (nextAppState === 'active') {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rn-countdown",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "A smart countdown component for react-native apps. You may use it to handle different status when request a verification code.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)