mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 03:33:36 +01:00
feat: allow changing SideStore app icon from within My Apps
This commit is contained in:
@@ -37,6 +37,8 @@ struct MyAppsView: View {
|
|||||||
@ObservedObject
|
@ObservedObject
|
||||||
var viewModel = MyAppsViewModel()
|
var viewModel = MyAppsViewModel()
|
||||||
|
|
||||||
|
@State var isShowingAppIconSwitcher = false
|
||||||
|
|
||||||
// TODO: Refactor
|
// TODO: Refactor
|
||||||
@State var isRefreshingAllApps: Bool = false
|
@State var isRefreshingAllApps: Bool = false
|
||||||
@State var selectedSideloadingIpaURL: URL?
|
@State var selectedSideloadingIpaURL: URL?
|
||||||
@@ -65,6 +67,10 @@ struct MyAppsView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
NavigationLink("", isActive: self.$isShowingAppIconSwitcher) {
|
||||||
|
AppIconsView()
|
||||||
|
}.hidden().frame(width: 0, height: 0)
|
||||||
|
|
||||||
LazyVStack(spacing: 16) {
|
LazyVStack(spacing: 16) {
|
||||||
if let progress = SideloadingManager.shared.progress {
|
if let progress = SideloadingManager.shared.progress {
|
||||||
VStack {
|
VStack {
|
||||||
@@ -261,7 +267,7 @@ extension MyAppsView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
guard installedApp.bundleIdentifier != StoreApp.altstoreAppID else {
|
guard installedApp.bundleIdentifier != StoreApp.altstoreAppID else {
|
||||||
return [.refresh]
|
return [.refresh, .chooseCustomIcon]
|
||||||
}
|
}
|
||||||
|
|
||||||
var actions: [AppAction] = []
|
var actions: [AppAction] = []
|
||||||
@@ -401,7 +407,11 @@ extension MyAppsView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func chooseIcon(for app: InstalledApp) {
|
func chooseIcon(for app: InstalledApp) {
|
||||||
|
if app.bundleIdentifier == StoreApp.altstoreAppID {
|
||||||
|
self.isShowingAppIconSwitcher = true
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func resetIcon(for app: InstalledApp) {
|
func resetIcon(for app: InstalledApp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user