Skip to content

Commit

Permalink
Reinstall Mythic Engine after stream change instead of just removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed Jul 27, 2024
1 parent 27b708d commit d9d7bfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Mythic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2839;
CURRENT_PROJECT_VERSION = 2840;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand Down Expand Up @@ -764,7 +764,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2839;
CURRENT_PROJECT_VERSION = 2840;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand Down
12 changes: 8 additions & 4 deletions Mythic/Views/Navigation/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct SettingsView: View {

@State private var isEpicCloudSynchronising: Bool = false

@State private var isEngineChangeAlertPresented: Bool = false
@State private var isEngineStreamChangeAlertPresented: Bool = false
@State private var isEngineRemovalAlertPresented: Bool = false
@State private var isResetAlertPresented: Bool = false
@State private var isResetSettingsAlertPresented: Bool = false
Expand Down Expand Up @@ -170,14 +170,18 @@ struct SettingsView: View {
""")
}
.onChange(of: engineBranch) {
isEngineChangeAlertPresented = true
isEngineStreamChangeAlertPresented = true
}
.alert(isPresented: $isEngineChangeAlertPresented) {
.alert(isPresented: $isEngineStreamChangeAlertPresented) {
.init(
title: .init("Would you like to remove Mythic Engine?"),
title: .init("Would you like to reinstall Mythic Engine?"),
message: .init("To change the engine type, Mythic Engine must be reinstalled through onboarding."),
primaryButton: .destructive(.init("OK")) {
try? Engine.remove()

let app = MythicApp() // FIXME: is this dangerous or just stupid
app.onboardingPhase = .engineDisclaimer
app.isOnboardingPresented = true
},
secondaryButton: .cancel()
)
Expand Down

0 comments on commit d9d7bfb

Please sign in to comment.