added FileReceiver.reset
This commit is contained in:
parent
b08f40aaa3
commit
fde4d311e3
2 changed files with 11 additions and 6 deletions
|
@ -11,11 +11,7 @@ export default class FileReceiver extends Nanobus {
|
|||
this.keychain.setPassword(fileInfo.password, fileInfo.url);
|
||||
}
|
||||
this.fileInfo = fileInfo;
|
||||
this.fileDownload = null;
|
||||
this.msg = 'fileSizeProgress';
|
||||
this.state = 'initialized';
|
||||
this.progress = [0, 1];
|
||||
this.cancelled = false;
|
||||
this.reset();
|
||||
}
|
||||
|
||||
get progressRatio() {
|
||||
|
@ -36,6 +32,14 @@ export default class FileReceiver extends Nanobus {
|
|||
}
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.fileDownload = null;
|
||||
this.msg = 'fileSizeProgress';
|
||||
this.state = 'initialized';
|
||||
this.progress = [0, 1];
|
||||
this.cancelled = false;
|
||||
}
|
||||
|
||||
async getMetadata() {
|
||||
const meta = await metadata(this.fileInfo.id, this.keychain);
|
||||
if (meta) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue