Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question to OCKButtonLogTaskViewController adding data base entries #506

Open
Hatsushira opened this issue Sep 29, 2020 · 2 comments
Open

Comments

@Hatsushira
Copy link
Contributor

Hatsushira commented Sep 29, 2020

I recognized that this controller adds the amount of entries + 1 to OCKCDOutcomeValue it already had for every new entry. So the first log has one. The second log adds two, the third log adds additional three.

Is this the right behaviour or am I doing something wrong? My setup is simply:

let drinkCard = OCKButtonLogTaskViewController(taskID: "drink", eventQuery: .init(for: date), storeManager: self.storeManager)
listViewController.appendViewController(drinkCard, animated: false)
@erik-apple
Copy link
Collaborator

Your setup looks correct. How many times is the task "drink" scheduled to occur during the day?

The OCKButtonLogTaskViewController should add one row each time you tap the button. Are you seeing something different?

@Hatsushira
Copy link
Contributor Author

Hatsushira commented Oct 2, 2020

The button adds one entry. On the frontend it all looks fine and the data is correct.

I think I was a little unclear. So if I add a second entry. The first entry in the OCKStore is marked as deleted and two new entries are added. If I add a third entry, the previous two entries are marked deleted and three new ones are added.

I used the nausea example task (with schedule, anytime throughout the day) and card and just changed title and instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants