提交 4831efe2 编写于 作者: B Benjamin Pasero

Progress API: Can't report 0 progress (fixes #46636)

上级 d656cdac
......@@ -468,12 +468,12 @@ export class NotificationTemplateRenderer {
}
// Total / Worked
else if (state.total || state.worked) {
if (state.total) {
else if (typeof state.total === 'number' || typeof state.worked === 'number') {
if (typeof state.total === 'number') {
this.template.progress.total(state.total);
}
if (state.worked) {
if (typeof state.worked === 'number') {
this.template.progress.worked(state.worked).getContainer().show();
}
}
......
......@@ -211,7 +211,7 @@ export class ProgressService2 implements IProgressService2 {
};
const updateProgress = (notification: INotificationHandle, percentage?: number): void => {
if (typeof percentage === 'number' && percentage > 0) {
if (typeof percentage === 'number' && percentage >= 0) {
notification.progress.total(100); // always percentage based
notification.progress.worked(percentage);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册