no post after update
This commit is contained in:
@@ -100,8 +100,8 @@ pub fn build_update_candidates(
|
|||||||
icon_url: update.icon_url.clone().or_else(|| definition.and_then(|item| item.icon_url.clone())),
|
icon_url: update.icon_url.clone().or_else(|| definition.and_then(|item| item.icon_url.clone())),
|
||||||
use_manifest: definition.map(|item| item.use_manifest).unwrap_or(false),
|
use_manifest: definition.map(|item| item.use_manifest).unwrap_or(false),
|
||||||
manifest_url: definition.and_then(|item| item.manifest_url.clone()),
|
manifest_url: definition.and_then(|item| item.manifest_url.clone()),
|
||||||
post_install: definition.and_then(|item| item.post_install.clone()),
|
post_install: None,
|
||||||
post_install_url: definition.and_then(|item| item.post_install_url.clone()),
|
post_install_url: None,
|
||||||
action_label: "更新".to_string(),
|
action_label: "更新".to_string(),
|
||||||
target_version: update.available_version.clone(),
|
target_version: update.available_version.clone(),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,10 +56,11 @@ export const useTaskRuntimeStore = defineStore('task-runtime', {
|
|||||||
|
|
||||||
async install(id: string, targetVersion?: string) {
|
async install(id: string, targetVersion?: string) {
|
||||||
const catalog = useCatalogStore()
|
const catalog = useCatalogStore()
|
||||||
const software = catalog.findSoftware(id)
|
const updateSoftware = catalog.updates.find(item => item.id.toLowerCase() === id.toLowerCase())
|
||||||
|
const software = updateSoftware ?? catalog.findSoftware(id)
|
||||||
if (!software) return
|
if (!software) return
|
||||||
|
|
||||||
const enablePostInstall = this.postInstallPrefs[id] !== false
|
const enablePostInstall = updateSoftware ? false : this.postInstallPrefs[id] !== false
|
||||||
try {
|
try {
|
||||||
await invoke('install_software', {
|
await invoke('install_software', {
|
||||||
task: {
|
task: {
|
||||||
|
|||||||
Reference in New Issue
Block a user