Skip to content
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

fix: correctly populate chat input text when editing the first message #170

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

a-ghorbani
Copy link
Owner

@a-ghorbani a-ghorbani commented Jan 12, 2025

Description

When entering edit mode for a message, the entire chat screen would remount, causing the input state to reset. This was happening because shouldShowHeaderDivider computed property would change when messages were filtered in edit mode, triggering a screen options update.

Solution

Added !isEditMode condition to shouldShowHeaderDivider getter to prevent header style changes during edit mode. This ensures screen options remain stable when editing messages.

Fixes #169

Platform Affected

  • iOS
  • Android

Checklist

  • Necessary comments have been made.
  • I have tested this change on:
    • iOS Simulator/Device
    • Android Emulator/Device
  • Unit tests and integration tests pass locally.

@a-ghorbani a-ghorbani marked this pull request as ready for review January 12, 2025 10:07
@a-ghorbani a-ghorbani merged commit c08ccc8 into main Jan 12, 2025
1 check passed
@a-ghorbani a-ghorbani deleted the fix/first-message-edit-bug branch January 13, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Editing first message doesn't populate the chat text input properly
1 participant