fix(chat): isolate pending flows and cancel stale requests
This commit is contained in:
@@ -153,6 +153,7 @@ export function useAppNavigator(): AppNavigator {
|
||||
|
||||
void (async () => {
|
||||
await NavigationStorage.savePendingChatUnlock({
|
||||
characterId: character.id,
|
||||
displayMessageId,
|
||||
messageId,
|
||||
kind,
|
||||
@@ -165,7 +166,7 @@ export function useAppNavigator(): AppNavigator {
|
||||
router.push(ROUTE_BUILDERS.authWithRedirect(returnUrl));
|
||||
})();
|
||||
},
|
||||
[isAuthenticatedUser, router],
|
||||
[character.id, isAuthenticatedUser, router],
|
||||
);
|
||||
|
||||
const openSubscriptionForPendingUnlock = useCallback(
|
||||
@@ -183,6 +184,7 @@ export function useAppNavigator(): AppNavigator {
|
||||
}: OpenSubscriptionForPendingUnlockInput): void => {
|
||||
void (async () => {
|
||||
await NavigationStorage.savePendingChatUnlock({
|
||||
characterId: character.id,
|
||||
displayMessageId,
|
||||
messageId,
|
||||
kind,
|
||||
@@ -200,7 +202,7 @@ export function useAppNavigator(): AppNavigator {
|
||||
});
|
||||
})();
|
||||
},
|
||||
[getDefaultPayChannel, openSubscription],
|
||||
[character.id, getDefaultPayChannel, openSubscription],
|
||||
);
|
||||
|
||||
const exitSubscription = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user