Skip to content

Commit 35eeb39

Browse files
committed
^ Merge fixes
1 parent 42d09ce commit 35eeb39

2 files changed

Lines changed: 4 additions & 35 deletions

File tree

Cork/Views/Installation/Sub-Views/Presenting Search Results.swift

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ struct PresentingSearchResultsView: View
151151
{
152152
Button
153153
{
154-
getRequestedPackages()
155-
156-
// packageInstallationProcessStep = .installing
154+
packageInstallationProcessStep = .installing
157155
} label: {
158156
Text("add-package.install.action")
159157
}
@@ -171,35 +169,6 @@ struct PresentingSearchResultsView: View
171169
Text("action.search-again")
172170
}
173171
}
174-
175-
private func getRequestedPackages()
176-
{
177-
if let foundPackageSelection
178-
{
179-
do
180-
{
181-
let packageToInstall: BrewPackage = try foundPackageSelection.getPackage(tracker: searchResultTracker)
182-
183-
AppConstants.shared.logger.debug("Got package to install: \(packageToInstall.name), version \(packageToInstall.versions.formatted(.list(type: .and)))")
184-
185-
installationProgressTracker.packageBeingInstalled = PackageInProgressOfBeingInstalled(package: packageToInstall, installationStage: .ready, packageInstallationProgress: 0)
186-
187-
#if DEBUG
188-
AppConstants.shared.logger.info("Packages to install: \(installationProgressTracker.packageBeingInstalled.package.name, privacy: .public)")
189-
#endif
190-
}
191-
catch let packageByUUIDRetrievalError
192-
{
193-
#if DEBUG
194-
AppConstants.shared.logger.error("Failed while associating package with its ID: \(packageByUUIDRetrievalError, privacy: .public)")
195-
#endif
196-
197-
dismiss()
198-
199-
appState.showAlert(errorToShow: .couldNotAssociateAnyPackageWithProvidedPackageUUID)
200-
}
201-
}
202-
}
203172
}
204173

205174
private struct SearchResultsSection: View

Cork/Views/Installation/Sub-Views/Searching.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ struct InstallationSearchingView: View, Sendable
4747

4848
for formula in await foundFormulae
4949
{
50-
foundFormulaeTracker.append(BrewPackage(name: formula, type: .formula, installedOn: nil, versions: [], sizeInBytes: nil))
50+
foundFormulaeTracker.append(BrewPackage(name: formula, type: .formula, installedOn: nil, versions: [], sizeInBytes: nil, downloadCount: nil))
5151
}
5252
for cask in await foundCasks
5353
{
54-
foundCasksTracker.append(BrewPackage(name: cask, type: .cask, installedOn: nil, versions: [], sizeInBytes: nil))
54+
foundCasksTracker.append(BrewPackage(name: cask, type: .cask, installedOn: nil, versions: [], sizeInBytes: nil, downloadCount: nil))
5555
}
5656

5757
return (foundFormulaeTracker, foundCasksTracker)
@@ -95,7 +95,7 @@ struct InstallationSearchingView: View, Sendable
9595
else
9696
{ /// If it doesn't match, it's not in the array yet. Let's add it to the array
9797
tempArray.append(
98-
.init(name: packageNameWithoutItsVersion, type: unprocessedFoundPackage.type, installedOn: nil, versions: [packageVersionWithoutItsName], sizeInBytes: nil)
98+
.init(name: packageNameWithoutItsVersion, type: unprocessedFoundPackage.type, installedOn: nil, versions: [packageVersionWithoutItsName], sizeInBytes: nil, downloadCount: nil)
9999
)
100100
}
101101
}

0 commit comments

Comments
 (0)