-
Notifications
You must be signed in to change notification settings - Fork 836
chat clears on tapping an omi app notification #2442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
temimedical
pushed a commit
to temimedical/omi-fork
that referenced
this issue
May 28, 2025
…emature selectedChatAppId reset in HomePageWrapper.initState() - This was causing a race condition where notification navigation would clear chat messages - The app ID was being reset to null before notification route processing completed - Now notifications properly navigate to chat without clearing existing messages - Fixes BasedHardware#2442: Chat notification tapping clears messages - Tested: Verified that tapping chat notifications preserves existing messages
temimedical
pushed a commit
to temimedical/omi-fork
that referenced
this issue
May 28, 2025
…emature selectedChatAppId reset in HomePageWrapper.initState() - This was causing a race condition where notification navigation would clear chat messages - The app ID was being reset to null before notification route processing completed - Now notifications properly navigate to chat without clearing existing messages - Fixes BasedHardware#2442
mdmohsin7
added a commit
that referenced
this issue
Jun 1, 2025
#2462) ## Problem Chat notifications clear existing messages when tapped, causing users to lose their conversation history. ## Root Cause A race condition in `HomePageWrapper.initState()` was prematurely resetting `selectedChatAppId` to `null` before notification route processing completed. ## Solution Remove the premature `setSelectedChatAppId(null)` call that was causing the race condition. ## Testing ✅ Verified that tapping chat notifications now preserves existing messages ✅ No regressions in normal app functionality ## Impact - Fixes #2442: Chat notification tapping clears messages - Improves user experience by preserving conversation history - Minimal, targeted fix with no side effects **Files changed:** 1 file, 3 lines removed ## Technical Details The issue occurred because `context.read<AppProvider>().setSelectedChatAppId(null)` was being called in the `initState()` callback, which would execute before notification navigation completed. This caused the MessageProvider to clear messages when notifications tried to navigate to specific chats. By removing this premature reset, notifications can now properly navigate to chat without interfering with existing message state.
update backend /notifications route to save the notifications to messages collection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: