Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/windows' into windows
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanVicens committed Nov 22, 2023
2 parents 3368fb6 + f8e5d80 commit 227ae65
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/apps/main/tray/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ ipcMainDrive.on('FILE_DOWNLOADING', () => {
setTrayStatus('SYNCING');
});

ipcMainDrive.on('FILE_DOWNLOADED', () => {
setTrayStatus('IDLE');
});

ipcMainDrive.on('FILE_MOVED', () => {
setTrayStatus('IDLE');
});
Expand All @@ -41,7 +45,7 @@ ipcMainDrive.on('FILE_RENAMING', () => {
});

ipcMainDrive.on('FILE_RENAMED', () => {
setTrayStatus('LOADING');
setTrayStatus('IDLE');
});

ipcMainDrive.on('FILE_CLONNED', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,25 @@ export class ContentsDownloader {
Logger.debug('Downloader force stop', this.readableDownloader);
this.readableDownloader?.destroy();
this.readableDownloader?.emit('close');
this.ipc.send('FILE_DOWNLOADED', {
name: file.name,
extension: file.type,
nameWithExtension: file.nameWithExtension,
size: file.size,
processInfo: { elapsedTime: downloader.elapsedTime() },
});
} else {
this.ipc.send('FILE_DOWNLOADING', {
name: file.name,
extension: file.type,
nameWithExtension: file.nameWithExtension,
size: file.size,
processInfo: {
elapsedTime: downloader.elapsedTime(),
progress: hydrationProgress,
},
});
}

this.ipc.send('FILE_DOWNLOADING', {
name: file.name,
extension: file.type,
nameWithExtension: file.nameWithExtension,
size: file.size,
processInfo: {
elapsedTime: downloader.elapsedTime(),
progress: hydrationProgress,
},
});
});

downloader.on('error', (error: Error) => {
Expand Down

0 comments on commit 227ae65

Please sign in to comment.