Skip to content

Instantly share code, notes, and snippets.

@dai-shi
Created March 28, 2016 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dai-shi/d87ed7301860d461fbfc to your computer and use it in GitHub Desktop.
Save dai-shi/d87ed7301860d461fbfc to your computer and use it in GitHub Desktop.
diff --git a/imports/ui/Task.jsx b/imports/ui/Task.jsx
index bec76ba..db0999e 100644
--- a/imports/ui/Task.jsx
+++ b/imports/ui/Task.jsx
@@ -12,6 +12,10 @@ export default class Task extends Component {
Meteor.call('tasks.remove', this.props.task._id);
}
+ togglePrivate() {
+ Meteor.call('tasks.setPrivate', this.props.task._id, ! this.props.task.private);
+ }
+
render() {
// Give tasks a different className when they are checked off,
// so that we can style them nicely in CSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment