levibostian/Wendy-Android

Remove `taskId` in `PersistedPendingTask`.

levibostian opened this issue · 0 comments

I have id and taskId in PersistedPendingTask. I have taskId in PendingTask.

After working on Wendy-iOS as well as reading over my code, I do not see a reason to have taskId in PersistedPendingTask any longer.

In the iOS version of Wendy, I am using id in PersistedPendingTask which maps to PendingTask. In Wendy-Android, it seems the only reason that taskId exists is to give the user the ability to update their existing PendingTask in Wendy is they try to insert a PendingTask with the same tag and dataId as one that already exists in the sqlite DB.

I say that if a PendingTask already exists in the DB, do not update it. Log a big fat warning to the console for the developer to pay attention to and return the existing PendingTask they have already created before.

Maybe even make a strict mode in Wendy enabled by default where I throw an error if I try to insert a PendingTask that already has been added before.