fix(updates): sync driver store state after update center runs
This commit is contained in:
5 files changed
+174
-3
No files matched your search
@@ -35,7 +35,7 @@ import { canDownloadAndInstallUpdate, useAppUpdater } from "@/composables/useApp
|
||||
import { useMcpUpdateBadge } from "@/composables/useMcpUpdateBadge";
|
||||
import { useComponentUpdates, type ComponentUpdateCategory } from "@/composables/useComponentUpdates";
|
||||
import type { PluginUpdateBlock } from "@/composables/useComponentUpdates";
|
||||
import { COMPONENT_UPDATES_CHANGED_EVENT, notifyComponentPluginsUpdated, notifyComponentUpdatesChanged } from "@/lib/updates/componentUpdateEvents";
|
||||
import { COMPONENT_UPDATES_CHANGED_EVENT, notifyComponentDriverUpdatesChanged, notifyComponentPluginsUpdated, notifyComponentUpdatesChanged } from "@/lib/updates/componentUpdateEvents";
|
||||
import { driverStoreUpdateBadgeCount, showMcpUpdateBadge, showToolbarUpdateAction } from "@/lib/updates/updateBadges";
|
||||
import {
|
||||
continuePreparedAppUpdate,
|
||||
@@ -1341,6 +1341,7 @@ function reportComponentUpdateResult(result: Awaited<ReturnType<typeof component
|
||||
// Only a clean refresh is authoritative; a failed registry check must not clear stale toolbar state.
|
||||
if (result.failed.length === 0) syncToolbarComponentUpdateState();
|
||||
if (result.plugins > 0) notifyComponentPluginsUpdated();
|
||||
if (result.drivers > 0 || result.jdbc) notifyComponentDriverUpdatesChanged();
|
||||
if (updatedComponents.length) toast(t("updates.componentsAutoUpdated", { components: updatedComponents.join(t("updates.componentListSeparator")) }));
|
||||
if (result.blockedDrivers.length) {
|
||||
toast(t("driverStore.driverUpdateBlocked", { labels: updateBlockerLabels(result.blockedDrivers).join(", ") }), 8000);
|
||||
|
||||
Reference in new issue
Block a user