Updater: Properly clear changelist after update
This commit is contained in:
parent
2410582cf8
commit
57d586fab7
1 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,7 @@ export default ErrorBoundary.wrap(function Updater() {
|
||||||
disabled={isUpdating || isChecking}
|
disabled={isUpdating || isChecking}
|
||||||
onClick={withDispatcher(setIsUpdating, async () => {
|
onClick={withDispatcher(setIsUpdating, async () => {
|
||||||
if (await update()) {
|
if (await update()) {
|
||||||
|
setUpdates([]);
|
||||||
const needFullRestart = await rebuild();
|
const needFullRestart = await rebuild();
|
||||||
await new Promise<void>(r => {
|
await new Promise<void>(r => {
|
||||||
Alerts.show({
|
Alerts.show({
|
||||||
|
@ -123,6 +124,7 @@ export default ErrorBoundary.wrap(function Updater() {
|
||||||
if (outdated) {
|
if (outdated) {
|
||||||
setUpdates(changes);
|
setUpdates(changes);
|
||||||
} else {
|
} else {
|
||||||
|
setUpdates([]);
|
||||||
Toasts.show({
|
Toasts.show({
|
||||||
message: "No updates found!",
|
message: "No updates found!",
|
||||||
id: Toasts.genId(),
|
id: Toasts.genId(),
|
||||||
|
|
Loading…
Reference in a new issue