mjec / rc-niceties

End of batch niceties for the Recurse Center
MIT License
15 stars 5 forks source link

Saving does not update local cache #73

Open jasonaowen opened 3 years ago

jasonaowen commented 3 years ago

@christalee found in https://github.com/mjec/rc-niceties/issues/10#issuecomment-867734894:

When I edit an existing nicety on Write Niceties, then switch to the Admin page (which lists all outgoing niceties), the edited text shows up properly. The Admin page pulls data from the DB, so I have confidence that the data has been saved properly (the edited data also shows up after a server/page reload). When I switch back to Write Niceties, though, the unedited text shows up because the prop fromMe has not been changed to the edited text.

I initially thought this was a bug recently introduced during refactoring, but I searched back to 667d26 (since before I started working on this project) and replicated the error throughout. So I concluded it might be related or the same as this bug.

The above discussion notwithstanding, I think a solution should also include an update to fromMe with the edited nicety, so it persists between view switches.