1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-22 14:33:51 +00:00

updateAllOpenWindows when pulling repo

This commit is contained in:
Steven Hugg 2019-05-19 09:58:30 -04:00
parent 2e448e9ae8
commit 0a89695722
3 changed files with 11 additions and 1 deletions

View File

@ -146,7 +146,6 @@ TODO:
- handle overwrite logic
- test edge/failure cases
- what to do about included files?
- what if files already open in editor
- can published files retain path?
- what if import interrupted and partial files?
- CORS for some blobs?

View File

@ -521,6 +521,7 @@ function _pullProjectFromGithub(e) {
setWaitDialog(true);
getGithubService().pull(ghurl).then( (sess:GHSession) => {
setWaitDialog(false);
projectWindows.updateAllOpenWindows(store);
});
}

View File

@ -135,4 +135,14 @@ export class ProjectWindows {
}
}
updateAllOpenWindows(store) {
for (var fileid in this.id2window) {
var wnd = this.id2window[fileid];
if (wnd && wnd.setText) {
store.getItem(fileid).then((data) => {
this.updateFile(fileid, data);
});
}
}
}
};