Fix title setter logic and separate it from UI

This commit is contained in:
Caleb James DeLisle
2017-08-17 19:58:48 +02:00
parent ec87f3f897
commit cf6d8c83b2
5 changed files with 25 additions and 24 deletions

View File

@@ -50,19 +50,9 @@ define(['jquery'], function ($) {
cb = cb || $.noop;
if (newTitle === exp.title) { return; }
// Change the title now, and set it back to the old value if there is an error
var oldTitle = exp.title;
Common.setPadTitleInDrive(newTitle, function (err, data) {
if (err) {
console.log("Couldn't set pad title");
console.error(err);
updateLocalTitle(oldTitle);
return void cb(err);
}
metadataMgr.updateTitle(newTitle);
//onLocal();
cb(null, data);
if (!$title) { return; }
});
//var oldTitle = exp.title;
Common.updateTitle(newTitle, cb)
//cb(null, newTitle);
};
// TODO not needed?