From 54703ddca3a9025a9b90dfa31f43e620e2c08a92 Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Sat, 27 May 2023 22:10:26 -0700 Subject: [PATCH] feat: allow changing SideStore app icon from within My Apps --- AltStore/SwiftUI/Views/My Apps/MyAppsView.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/AltStore/SwiftUI/Views/My Apps/MyAppsView.swift b/AltStore/SwiftUI/Views/My Apps/MyAppsView.swift index 90603753..d37bb150 100644 --- a/AltStore/SwiftUI/Views/My Apps/MyAppsView.swift +++ b/AltStore/SwiftUI/Views/My Apps/MyAppsView.swift @@ -37,6 +37,8 @@ struct MyAppsView: View { @ObservedObject var viewModel = MyAppsViewModel() + @State var isShowingAppIconSwitcher = false + // TODO: Refactor @State var isRefreshingAllApps: Bool = false @State var selectedSideloadingIpaURL: URL? @@ -65,6 +67,10 @@ struct MyAppsView: View { var body: some View { ScrollView { + NavigationLink("", isActive: self.$isShowingAppIconSwitcher) { + AppIconsView() + }.hidden().frame(width: 0, height: 0) + LazyVStack(spacing: 16) { if let progress = SideloadingManager.shared.progress { VStack { @@ -261,7 +267,7 @@ extension MyAppsView { } guard installedApp.bundleIdentifier != StoreApp.altstoreAppID else { - return [.refresh] + return [.refresh, .chooseCustomIcon] } var actions: [AppAction] = [] @@ -401,7 +407,11 @@ extension MyAppsView { } func chooseIcon(for app: InstalledApp) { - + if app.bundleIdentifier == StoreApp.altstoreAppID { + self.isShowingAppIconSwitcher = true + } else { + + } } func resetIcon(for app: InstalledApp) {