提交 8f825bbc 编写于 作者: B Benjamin Pasero

Progress can go backwards (fixes #46717)

上级 62e8df33
......@@ -72,8 +72,8 @@ function mergeProgress(result: IProgressStep, currentValue: IProgressStep): IPro
result.message = currentValue.message;
if (typeof currentValue.percentage === 'number' && typeof result.message === 'number') {
result.percentage += currentValue.percentage;
} else {
result.percentage = currentValue.percentage || result.percentage;
} else if (typeof currentValue.percentage === 'number') {
result.percentage = currentValue.percentage;
}
return result;
}
......
......@@ -469,7 +469,7 @@ export class NotificationTemplateRenderer {
// Total / Worked
else if (typeof state.total === 'number' || typeof state.worked === 'number') {
if (typeof state.total === 'number') {
if (typeof state.total === 'number' && !this.template.progress.hasTotal()) {
this.template.progress.total(state.total);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册