fix(ui/browser): only refresh item list after one uploading is finished
This commit is contained in:
parent
565c7324ef
commit
8fa9cd2b0d
2 changed files with 13 additions and 6 deletions
|
@ -204,13 +204,17 @@ export class Browser extends React.Component<Props, State, {}> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
updateProgress = (infos: Map<string, UploadEntry>) => {
|
updateProgress = (infos: Map<string, UploadEntry>, refresh: boolean) => {
|
||||||
updater().setUploadings(infos);
|
updater().setUploadings(infos);
|
||||||
updater()
|
if (refresh) {
|
||||||
.setItems(this.props.browser.dirPath)
|
updater()
|
||||||
.then(() => {
|
.setItems(this.props.browser.dirPath)
|
||||||
this.update(updater().updateBrowser);
|
.then(() => {
|
||||||
});
|
this.update(updater().updateBrowser);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.update(updater().updateBrowser);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
select = (itemName: string) => {
|
select = (itemName: string) => {
|
||||||
|
|
|
@ -104,6 +104,9 @@ export class StateMgr extends React.Component<Props, State, {}> {
|
||||||
this.update(updater().updateLogin);
|
this.update(updater().updateLogin);
|
||||||
this.update(updater().updatePanes);
|
this.update(updater().updatePanes);
|
||||||
this.update(updater().updateAdmin);
|
this.update(updater().updateAdmin);
|
||||||
|
|
||||||
|
updater().initLan();
|
||||||
|
this.update(updater().updateMsg);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue