Updater: Properly clear changelist after update

This commit is contained in:
Vendicated 2022-10-01 22:14:57 +02:00
parent 2410582cf8
commit 57d586fab7
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3

View file

@ -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(),