Closed klinker24 closed 4 years ago
This is awesome - I'll review later on - traveling today. I've been meaning to implement this, but have been blocking myself with a requirement for unit tests.
The backend does not delete the draft messages when a message is sent, so for your third point, that would be an issue. We should probably delete the draft (if one exists), when a message is sent.
For the fourth point... Yeah I mentioned that in the opening comment. Right now I am not dealing with the conversation list at all, it won't update the snippets. It is a bit weird, but not something I am interested in changing right now. There are other issues that need to be worked out before that will really work correctly.
I say we integrate this without caching anything first, then we move to that. Agreed that there are definite gains we can make through caching. We are still going to need to fetch the drafts when we open the thread, since we want them to transfer between devices. I don't think we can just do it on app load, since this will also apply to the desktop app, which persists much longer than a webpage
Drafts have never been saved or applied within conversations, on the web app. This adds support for creating text drafts. This will not support image drafts.
If a new draft is saved, it simply replaces all of the old drafts.
This draft support does differ slightly from the phone app in regards to the conversation snippet. These are known differences and may be something that I address in the future, but it isn't really a big priority for me.
I also want to make a note that drafts won't transfer between the web and android app until I release a new version of the Android app (
v5.2.2
). I will release that before deploying this (maybe today). Just a heads up for testing.This closes https://github.com/klinker-apps/pulse-sms-issues/issues/806