Skip to content

Commit

Permalink
Release 21.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
babich-a committed Jan 24, 2022
1 parent 14dfb2d commit 8aa284a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 110 deletions.
3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

69 changes: 0 additions & 69 deletions .vscode/launch.json

This file was deleted.

5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

17 changes: 9 additions & 8 deletions js/ui/file_manager/file_items_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,20 @@ export default class FileItemsController {
return this._updateProviderOnly(fileProvider);
}

return this._getDirectoryByPathParts(this._rootDirectoryInfo, currentPathKeys, true).then(newDirectory => {
if(newDirectory !== this._rootDirectoryInfo) {
this._resetCurrentDirectory();
}
this._setProvider(fileProvider);
return this.setCurrentPathByKeys(currentPathKeys);
});
return when(this._getDirectoryByPathParts(this._rootDirectoryInfo, currentPathKeys, true))
.then(newDirectory => {
if(newDirectory !== this._rootDirectoryInfo) {
this._resetCurrentDirectory();
}
this._setProvider(fileProvider);
})
.then(() => this.setCurrentPathByKeys(currentPathKeys));
}

_updateProviderOnly(fileProvider) {
this._resetCurrentDirectory();
this._setProvider(fileProvider);
return this.refresh();
return when(this.refresh());
}

_createFileProvider(fileProvider) {
Expand Down
35 changes: 21 additions & 14 deletions js/ui/file_manager/ui.file_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FileManager extends Widget {
super._init();
this._initActions();

this._providerUpdateDeferred = new Deferred().resolve();
this._providerUpdateDeferred = null;
this._lockCurrentPathProcessing = false;

this._controller = new FileItemsController({
Expand Down Expand Up @@ -532,20 +532,24 @@ class FileManager extends Widget {

switch(name) {
case 'currentPath':
this._lockCurrentPathProcessing = true;

this._providerUpdateDeferred.then(() => {
this._lockCurrentPathProcessing = false;
return this._controller.setCurrentPath(args.value);
});
{
const updateFunc = () => {
this._lockCurrentPathProcessing = false;
return this._controller.setCurrentPath(args.value);
};
this._lockCurrentPathProcessing = true;
this._providerUpdateDeferred ? this._providerUpdateDeferred.then(updateFunc) : updateFunc();
}
break;
case 'currentPathKeys':
this._lockCurrentPathProcessing = true;

this._providerUpdateDeferred.then(() => {
this._lockCurrentPathProcessing = false;
this._controller.setCurrentPathByKeys(args.value);
});
{
const updateFunc = () => {
this._lockCurrentPathProcessing = false;
return this._controller.setCurrentPathByKeys(args.value);
};
this._lockCurrentPathProcessing = true;
this._providerUpdateDeferred ? this._providerUpdateDeferred.then(updateFunc) : updateFunc();
}
break;
case 'selectedItemKeys':
if(!this._lockSelectionProcessing && this._itemView) {
Expand All @@ -568,7 +572,10 @@ class FileManager extends Widget {
const pathKeys = this._lockCurrentPathProcessing ? undefined : this.option('currentPathKeys');
this._controller.updateProvider(args.value, pathKeys)
.then(() => this._providerUpdateDeferred.resolve())
.then(() => this.repaint());
.always(() => {
this._providerUpdateDeferred = null;
this.repaint();
});
break;
}
case 'allowedFileExtensions':
Expand Down
11 changes: 0 additions & 11 deletions themebuilder-scss/dart-compiler/.vscode/launch.json

This file was deleted.

0 comments on commit 8aa284a

Please sign in to comment.