From d9d7bfb02ce01f76c6b7fc7383d4d2741b9e0d61 Mon Sep 17 00:00:00 2001 From: blackxfiied <41133734+blackxfiied@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:03:10 +0800 Subject: [PATCH] Reinstall Mythic Engine after stream change instead of just removing it --- Mythic.xcodeproj/project.pbxproj | 4 ++-- Mythic/Views/Navigation/Settings.swift | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Mythic.xcodeproj/project.pbxproj b/Mythic.xcodeproj/project.pbxproj index c28f8c32..fd625abe 100644 --- a/Mythic.xcodeproj/project.pbxproj +++ b/Mythic.xcodeproj/project.pbxproj @@ -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 = ""; @@ -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 = ""; diff --git a/Mythic/Views/Navigation/Settings.swift b/Mythic/Views/Navigation/Settings.swift index d6306b87..891d83d2 100644 --- a/Mythic/Views/Navigation/Settings.swift +++ b/Mythic/Views/Navigation/Settings.swift @@ -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 @@ -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() )