You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All local-only posts have a postID of -1. This is potentially a problem anywhere reference a post by postID since for local-only post it is not unique.
Theory: Some of the bug reports regarding missing or vanishing drafts are related to non-unique -1 postID.
Scrub the publish logic for problems and investigate other options for local-only postIDs.
The default value being -1 is not problem in itself.
The entire flow has been re-design in the scope of pcdRpT-6vS-p2. For example, these problematic queries are gone:
let query =
// Existing draft/pending posts
"(statusAfterSync = status AND status IN (%@))"
// Existing draft/pending posts transitioned to another status but not uploaded yet
+ " OR (statusAfterSync != status AND statusAfterSync IN (%@))"
// Posts existing only on the device with statuses defined in `statusesForLocalDrafts`.
+ " OR (postID = %i AND status IN (%@))"
// Include other existing draft/pending posts with `nil` `statusAfterSync`. This is
// unlikely but this ensures that those posts will show up somewhere.
+ " OR (postID > %i AND statusAfterSync = nil AND status IN (%@))"
``
It's now just:
"status == draft"
Other areas have also been updated and are fully covered by integration tests. I think it's fair to close it.
All local-only posts have a
postID
of-1
. This is potentially a problem anywhere reference a post by postID since for local-only post it is not unique.Theory: Some of the bug reports regarding missing or vanishing drafts are related to non-unique -1 postID.
Scrub the publish logic for problems and investigate other options for local-only postIDs.
cc @bummytime
The text was updated successfully, but these errors were encountered: