Skip to content
This repository has been archived by the owner on Jan 18, 2018. It is now read-only.

demo task list does not update until certain interactions occur #8

Open
DallanQ opened this issue Oct 8, 2013 · 1 comment
Open

Comments

@DallanQ
Copy link

DallanQ commented Oct 8, 2013

If I share this with a different email address on a different computer and I add a task, the task doesn't show up on the other computer unless I: (a) start typing into the input field, (b) double-click to edit a todo, (c) delete a todo, or (d) click All/Active/Completed.

On the other hand if I edit a task, the updated task shows up immediately, without my needing to interact with the app on the other computer.

Any ideas why new tasks aren't showing up immediately?

@DallanQ
Copy link
Author

DallanQ commented Oct 8, 2013

To resolve this problem I added

document.getModel().getRoot().get('todos').addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED, this.changeListener);
document.getModel().getRoot().get('todos').addEventListener(gapi.drive.realtime.EventType.VALUES_REMOVED, this.changeListener);

in storage.setDocument below where the OBJECT_CHANGE listener is added. Not sure why this is needed or if this is the correct solution.

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

No branches or pull requests

1 participant