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

Small one: images sometimes sent twice #2744

Open
qdhj opened this issue Apr 17, 2023 · 2 comments
Open

Small one: images sometimes sent twice #2744

qdhj opened this issue Apr 17, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@qdhj
Copy link

qdhj commented Apr 17, 2023

Small one: if hit enter like crazy while uploading an image to chat, it will be sent twice.

  • Device: PC
  • OS: Windows 10
  • Session Version: v1.10.8
@Bilb Bilb added bug Something isn't working good first issue Good for newcomers labels May 25, 2023
@VityaSchel
Copy link

Just tested on macos, v1.12.3

Also happens when quickly clicking send button (in textbox) and image can be sent as many times as you pressed send button.

For some reason it only happens when you send image for the first time in app, after first time there are no delays between pressing send button and resetting message input, regardless of app restarts or selected conversation.

@VityaSchel
Copy link

This happens because getFiles function in CompositionBoxInner takes long time to complete and nothing stops user from calling onSendMessage() multiple times. I have added isSendingMessage boolean property to class and early return that checks if isSendingMessage is set to true. I have added finally clause to prevent user from app lock in sending message state if any errors occur in this function: #3100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants