pmartin/plop-reader

Manage deleted entries outside plop reader

Opened this issue · 3 comments

If an article is deleted from wallabag after being synchronize in plop reader, so it is not able to manage them.
The entry stay in the unread list.

The application should delete the entry and it would be interesting to have an option to delete an entry.

Hi, thanks for this issue ;-)
I pretty much never delete entries, so I didn't really think about that before -- glad to see other people using the app ;-)

Sync of deletion from ereader to server should not be too hard to implement.
=> I'll probably implement it (I'm thinking about a menu that opens on an entry when one long-touches it, with a "delete" option in it) : I'll just add "deleted" flag in the local DB and call the API endpoint to delete the entry when syncing.

Sync of deletion from server to ereader will probably be much harder, though: I suppose the deleted entry is not returned by the API... But I cannot just delete, on the ereader, entries that are present locally but not returned by the API, as I only fetch 200 entries from server -- and not all entries.
=> Not sure what I'll be able to do for sync in this direction; I need investigate a bit more.

I don't know the wallabag API but if you can ask for a single entry via it's wallabag id, you could check the missing entry one by one (but it is maybe not good for the performance of the sync) ?

I could do that, but I'd prefer not to: as you wrote, it might not be that great for performances during sync.
I'd rather think about some clever algo, trying to detect if a post should have been returned by the server but has not been -- and, only then, try to sync it and detect the 404.

In any case, if I do something like one of these ideas, it'll have to be in the background or with some parallelisation of requests ^^