Skip to content

Commit

Permalink
fix: invalid code after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
abretonc7s committed Jul 13, 2023
1 parent cdaf949 commit 015d705
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions app/core/SDKConnect/SDKConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,15 +737,9 @@ export class Connection extends EventEmitter2 {

waitForEmptyRPCQueue(this.rpcQueueManager)
.then(async () => {
// Queue might not be empty if it timedout ---Always force clear before to go back
this.rpcQueueManager.reset();

// Prevent double back issue android. (it seems that the app goes back randomly by itself)
if (wentBackMinimizer) {
// Skip, already went back.
return;
if (METHODS_TO_DELAY[msg?.data?.method]) {
await wait(1000);
}

this.setLoading(false);
Minimizer.goBack();
})
Expand Down Expand Up @@ -1240,10 +1234,6 @@ export class SDKConnect extends EventEmitter2 {
}
this.paused = false;
} else if (appState === 'background') {
// Reset wentBack state
wentBackMinimizer = true;
// Cancel rpc queue anytime app is backgrounded
this.rpcqueueManager.reset();
if (!this.paused) {
/**
* Pause connections after 20 seconds of the app being in background to respect device resources.
Expand Down Expand Up @@ -1306,8 +1296,6 @@ export class SDKConnect extends EventEmitter2 {

this.navigation = props.navigation;

Logger.log(`SDKConnect::init()`);

this.appStateListener = AppState.addEventListener(
'change',
this._handleAppState.bind(this),
Expand Down

0 comments on commit 015d705

Please sign in to comment.