todos: Switching from table.row.delete to table.delete now
that table.delete(key) is available in the API.
Change-Id: I58b808b93fc12ade34fea4377f02e8655538d9bf
diff --git a/browser/syncbase_dispatcher.js b/browser/syncbase_dispatcher.js
index ee4a60b..d71bf7e 100644
--- a/browser/syncbase_dispatcher.js
+++ b/browser/syncbase_dispatcher.js
@@ -264,7 +264,7 @@
define('removeTodo', function(ctx, todoId, cb) {
// TODO(ivanpi): Also delete corresponding tags.
- this.tb_.row(todoId).delete(ctx, cb);
+ this.tb_.delete(ctx, todoId, cb);
});
define('editTodoText', function(ctx, todoId, text, cb) {
@@ -284,10 +284,7 @@
});
define('removeTag', function(ctx, todoId, tag, cb) {
- // NOTE: Table.delete is awkward (it takes a range), so instead we use
- // Row.delete. It would be nice for Table.delete to operate on a single row
- // and have a separate Table.deleteRowRange.
- this.tb_.row(tagKey(todoId, tag)).delete(ctx, cb);
+ this.tb_.delete(ctx, tagKey(todoId, tag), cb);
});
////////////////////////////////////////