Skip to content

Commit 5917c04

Browse files
committed
refactor: remove timeout unref
1 parent 8894434 commit 5917c04

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/core/classes/Iterable.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable eslint-comments/no-unlimited-disable */
12
import {
23
Linking,
34
NativeEventEmitter,
@@ -80,8 +81,11 @@ export class Iterable {
8081
// Lazy initialization to avoid circular dependency
8182
if (!this._inAppManager) {
8283
// Import here to avoid circular dependency at module level
83-
// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
84-
const { IterableInAppManager } = require('../../inApp/classes/IterableInAppManager');
84+
85+
const {
86+
IterableInAppManager,
87+
// eslint-disable-next-line
88+
} = require('../../inApp/classes/IterableInAppManager');
8589
this._inAppManager = new IterableInAppManager();
8690
}
8791
return this._inAppManager;
@@ -484,7 +488,7 @@ export class Iterable {
484488
/**
485489
* Launch the application from the background in Android devices.
486490
*
487-
* @group Android Only
491+
* Android only.
488492
*
489493
* @example
490494
* ```typescript
@@ -948,11 +952,9 @@ export class Iterable {
948952

949953
if (Platform.OS === 'android') {
950954
//Give enough time for Activity to wake up.
951-
const timeoutId = setTimeout(() => {
955+
setTimeout(() => {
952956
callUrlHandler(url, context);
953957
}, 1000);
954-
// Use unref() to prevent the timeout from keeping the process alive
955-
timeoutId.unref();
956958
} else {
957959
callUrlHandler(url, context);
958960
}

0 commit comments

Comments
 (0)