Skip to content

Commit

Permalink
fix: show engine install button alongside other buttons instead of st…
Browse files Browse the repository at this point in the history
…andalone
  • Loading branch information
vapidinfinity committed Nov 3, 2024
1 parent 957f438 commit 4e337f8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Mythic/Views/Unified/Models/GameCardVM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ import Shimmer

@ViewBuilder
var installedGameButtons: some View {
if case .windows = game.platform, !Engine.exists {
engineInstallButton
} else if case .epic = game.source, needsVerification(for: game) {
if case .epic = game.source, needsVerification(for: game) {
verificationButton
} else {
if game.isLaunching {
Expand All @@ -76,7 +74,11 @@ import Shimmer
.foregroundStyle(.white)
.padding(5)
} else {
playButton
if case .windows = game.platform, !Engine.exists {
engineInstallButton
} else {
playButton
}
}
if game.needsUpdate {
updateButton
Expand Down Expand Up @@ -255,3 +257,8 @@ import Shimmer
// swiftlint:enable nesting
}
}

#Preview {
LibraryView()
.environmentObject(NetworkMonitor())
}

0 comments on commit 4e337f8

Please sign in to comment.