mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-18 17:25:21 -04:00
Fix linter warning
This commit is contained in:
parent
f42acf2e00
commit
bcdaccb342
1 changed files with 12 additions and 4 deletions
|
@ -76,8 +76,7 @@ struct ListRowInstaller: View {
|
|||
)
|
||||
HStack(spacing: 1) {
|
||||
Button {
|
||||
sheetType = .download
|
||||
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
||||
pressButton(.download)
|
||||
} label: {
|
||||
Image(systemName: "arrow.down.circle")
|
||||
.font(.body.bold())
|
||||
|
@ -85,8 +84,7 @@ struct ListRowInstaller: View {
|
|||
.help("Download and export macOS Installer")
|
||||
.buttonStyle(.mistAction)
|
||||
Button {
|
||||
sheetType = .volumeSelection
|
||||
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
||||
pressButton(.volumeSelection)
|
||||
} label: {
|
||||
Image(systemName: "externaldrive")
|
||||
.font(.body.bold())
|
||||
|
@ -172,6 +170,16 @@ struct ListRowInstaller: View {
|
|||
}
|
||||
}
|
||||
|
||||
private func pressButton(_ type: InstallerSheetType) {
|
||||
sheetType = type
|
||||
|
||||
if installer.compatible {
|
||||
Task { validate() }
|
||||
} else {
|
||||
showCompatibilityWarning()
|
||||
}
|
||||
}
|
||||
|
||||
private func open() {
|
||||
showOpenPanel = false
|
||||
openPanel.title = "Download Installer"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue