Skip to content

Commit

Permalink
Merge pull request #37481 from wildan-m/wildan/fix/36632-simultant-si…
Browse files Browse the repository at this point in the history
…gnout

Correct simultaneous logout when the account is closed.
  • Loading branch information
chiragsalian authored Mar 4, 2024
2 parents 4f21d80 + e3434de commit 780e2ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ function signOut() {
};

API.write(WRITE_COMMANDS.LOG_OUT, params);
clearCache().then(() => {
Log.info('Cleared all cache data', true, {}, true);
});
Timing.clearData();
}

/**
Expand Down Expand Up @@ -591,6 +587,10 @@ function cleanupSession() {
NetworkConnection.clearReconnectionCallbacks();
SessionUtils.resetDidUserLogInDuringSession();
resetHomeRouteParams();
clearCache().then(() => {
Log.info('Cleared all cache data', true, {}, true);
});
Timing.clearData();
}

function clearAccountMessages() {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const isChannelMuted = (reportId: string) =>
});

function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) {
const reportActionsOnly = pushJSON.filter((update) => update.key.includes('reportActions_'));
const reportActionsOnly = pushJSON.filter((update) => update.key?.includes('reportActions_'));
// "reportActions_5134363522480668" -> "5134363522480668"
const reportIDs = reportActionsOnly.map((value) => value.key.split('_')[1]);

Expand Down

0 comments on commit 780e2ac

Please sign in to comment.