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}
onClick={withDispatcher(setIsUpdating, async () => {
if (await update()) {
setUpdates([]);
const needFullRestart = await rebuild();
await new Promise<void>(r => {
Alerts.show({
@ -123,6 +124,7 @@ export default ErrorBoundary.wrap(function Updater() {
if (outdated) {
setUpdates(changes);
} else {
setUpdates([]);
Toasts.show({
message: "No updates found!",
id: Toasts.genId(),