fix(chat): isolate pending flows and cancel stale requests

This commit is contained in:
2026-07-17 19:22:01 +08:00
parent 2fc312b5c7
commit 8bb1e21886
27 changed files with 501 additions and 92 deletions
+4 -2
View File
@@ -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(