Skip to content

Commit

Permalink
Reset update progress in IntelStackApp
Browse files Browse the repository at this point in the history
  • Loading branch information
lucka-me committed Feb 28, 2024
1 parent 7b20246 commit dc30a4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions App/Shared/Data/ScriptManager+Task.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ extension ScriptManager {
}

extension ScriptManager {
func updateScripts(reporting progress: Progress, currentMainScriptVersion: String?) async throws {
defer {
progress.completedUnitCount = 0
}

func updateScripts(reporting progress: Progress, currentMainScriptVersion: String?) async throws {
try Self.ensureInternalDirectories()

let internalPlugins = try internalPluginNames
Expand Down
1 change: 1 addition & 0 deletions App/Shared/IntelStackApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ struct IntelStackApp: App {
@MainActor
private func updatePlugins() async throws {
guard updateStatus == .idle else { return }
updateProgress.completedUnitCount = 0
updateStatus = .updating
defer { updateStatus = .idle }
try await scriptManager.updateScripts(
Expand Down

0 comments on commit dc30a4a

Please sign in to comment.