From d7b820642541d62908961c6c05da010ccb7effd2 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 10 Jul 2026 13:12:38 +0800 Subject: [PATCH] fix: push notification navigation delay and stale in-app avatar - switchToThread: wait for CHANNEL_LIST to be top of stack instead of the unreachable HOME tab-group segment, fixing the ~30s delay when opening thread notifications while the app is running - reduce wait fallback timeouts to 1s - icon.tsx: re-subscribe to the sender's avatar when senderId changes, fixing stale avatars shown on bursty/rapid notifications --- app/actions/local/channel.ts | 2 +- app/actions/local/thread.ts | 2 +- app/screens/in_app_notification/icon.tsx | 2 +- app/store/navigation_store.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/actions/local/channel.ts b/app/actions/local/channel.ts index 36bd37758a..a402c06902 100644 --- a/app/actions/local/channel.ts +++ b/app/actions/local/channel.ts @@ -96,7 +96,7 @@ export async function switchToChannel(serverUrl: string, channelId: string, team } DeviceEventEmitter.emit(NavigationConstants.NAVIGATION_HOME, Screens.CHANNEL); } else { - await NavigationStore.waitUntilScreenHasLoaded(Screens.HOME); + await NavigationStore.waitUntilScreenHasLoaded(Screens.CHANNEL_LIST); await dismissAllRoutesAndPopToScreen(Screens.CHANNEL); } diff --git a/app/actions/local/thread.ts b/app/actions/local/thread.ts index d06949bc07..2804c405ca 100644 --- a/app/actions/local/thread.ts +++ b/app/actions/local/thread.ts @@ -87,7 +87,7 @@ export const switchToThread = async (serverUrl: string, rootId: string, isFromNo } await navigateToRoot(); - await NavigationStore.waitUntilScreenIsTop(Screens.HOME); + await NavigationStore.waitUntilScreenIsTop(Screens.CHANNEL_LIST); if (currentTeamId !== teamId && isTabletDevice) { DeviceEventEmitter.emit(Navigation.NAVIGATION_HOME, Screens.GLOBAL_THREADS); } diff --git a/app/screens/in_app_notification/icon.tsx b/app/screens/in_app_notification/icon.tsx index 54a95f9d11..1743a323ed 100644 --- a/app/screens/in_app_notification/icon.tsx +++ b/app/screens/in_app_notification/icon.tsx @@ -86,7 +86,7 @@ const NotificationIcon = ({author, enablePostIconOverride, fromWebhook, override ); }; -const enhanced = withObservables([], ({database, senderId}: WithDatabaseArgs & {senderId: string}) => { +const enhanced = withObservables(['senderId'], ({database, senderId}: WithDatabaseArgs & {senderId: string}) => { const author = observeUser(database, senderId); return { diff --git a/app/store/navigation_store.ts b/app/store/navigation_store.ts index ca8012de40..b4b5c63a1c 100644 --- a/app/store/navigation_store.ts +++ b/app/store/navigation_store.ts @@ -98,7 +98,7 @@ class NavigationStoreSingleton { setTimeout(() => { subscription.unsubscribe(); resolve(); - }, 3000); + }, 1000); }); } @@ -120,7 +120,7 @@ class NavigationStoreSingleton { setTimeout(() => { subscription.unsubscribe(); resolve(); - }, 30000); + }, 1000); }); } @@ -141,7 +141,7 @@ class NavigationStoreSingleton { setTimeout(() => { subscription.unsubscribe(); resolve(); - }, 3000); + }, 1000); }); }