fix(app): hide unavailable titlebar update (#30642)

This commit is contained in:
Luke Parker
2026-06-03 23:51:40 +00:00
committed by GitHub
parent 04b38ce830
commit f62ba5eb86
4 changed files with 34 additions and 6 deletions
+2 -5
View File
@@ -89,6 +89,7 @@ import {
} from "./layout/sidebar-workspace"
import { ProjectDragOverlay, SortableProject, type ProjectSidebarContext } from "./layout/sidebar-project"
import { SidebarContent } from "./layout/sidebar-shell"
import { runUpdateAndRestart } from "./layout/update"
export default function Layout(props: ParentProps) {
const [store, setStore, , ready] = persisted(
@@ -183,11 +184,7 @@ export default function Layout(props: ParentProps) {
return updateQuery.data.version ?? ""
}
const installUpdate = () => {
if (!platform.updateAndRestart) return
setUpdate("installing", true)
void platform.updateAndRestart().catch(() => {
setUpdate("installing", false)
})
runUpdateAndRestart(platform.updateAndRestart, (installing) => setUpdate("installing", installing))
}
const titlebarUpdate: TitlebarUpdate = {
version: updateVersion,