retrospring icon indicating copy to clipboard operation
retrospring copied to clipboard

Two answers from a single user

Open arthurware opened this issue 3 years ago • 2 comments

Description: Somehow, I ended up answering a question twice, and each of those answers can be returned to inbox. I'm not sure if this can be reliably reproduced.

Steps to reproduce: Answer a question from the question page, have the page freeze (probably because of network instabilities), go back (or refresh, I don't remember exactly what I did), see that the question wasn't answered, answer it again.

Expected behaviour: A user shouldn't be able to answer a question twice.

Additional details: Bromite 100 Android 9

Also, I remember that answering a question at the question page, going back to inbox and trying to answer it again resulted in an error message. But, this time, there were no errors reported.

Screenshots:

  1. Question page after deleting the first answer
  2. My inbox
  3. Question page after answering with something different

Screenshot_20220525-214259_Bromite Screenshot_20220525-214252_Bromite Screenshot_20220525-220403_Bromite

arthurware avatar May 26 '22 01:05 arthurware

I think what's going on here is that the previous state of the inbox page is being held by Turbolinks after it loads and so it doesn't reload the page when you go back.

Maybe there's some way to update the state kept by Turbolinks after the answer is submitted?

We should also probably throw an error when trying to answer a question you've already answered.

@pixeldesu Thoughts?

raccube avatar May 26 '22 08:05 raccube

@raccube We should handle that mostly in the backend, yes.

That should solve the issue more than messing around more with Turbolinks etc.

pixeldesu avatar May 29 '22 03:05 pixeldesu