Merge pull request #665 from cycomachead/cloud-default

Really fix setting the cloud as default save location when logged in
pull/3/merge
Jens Mönig 2014-12-04 15:47:38 +01:00
commit 59ee043321
1 zmienionych plików z 4 dodań i 1 usunięć

5
gui.js
Wyświetl plik

@ -190,7 +190,7 @@ IDE_Morph.prototype.init = function (isAutoFill) {
// additional properties: // additional properties:
this.cloudMsg = null; this.cloudMsg = null;
this.source = SnapCloud.username ? 'cloud' : 'local'; this.source = 'local';
this.serializer = new SnapSerializer(); this.serializer = new SnapSerializer();
this.globalVariables = new VariableFrame(); this.globalVariables = new VariableFrame();
@ -241,6 +241,9 @@ IDE_Morph.prototype.openIn = function (world) {
if (usr) { if (usr) {
SnapCloud.username = usr.username || null; SnapCloud.username = usr.username || null;
SnapCloud.password = usr.password || null; SnapCloud.password = usr.password || null;
if (SnapCould.username) {
this.source = 'cloud';
}
} }
} }
} }