fix icon setting fr this time

This commit is contained in:
neon443
2025-05-15 12:31:53 +01:00
parent 87209f38f3
commit 033a01463f
5 changed files with 14 additions and 30 deletions

View File

@@ -12,6 +12,6 @@ TEAM_ID = 8JGND254B7
BUNDLE_ID = com.neon443.NearFuture BUNDLE_ID = com.neon443.NearFuture
BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets
GROUP_ID = group.NearFuture GROUP_ID = group.NearFuture
VERSION = 4.3.3 VERSION = 4.3.4
NAME = Near Future NAME = Near Future
BUILD_NUMBER = 1 BUILD_NUMBER = 1

View File

@@ -44,7 +44,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"

View File

@@ -138,14 +138,14 @@ class SettingsViewModel: ObservableObject {
@Published var colorChoices: [AccentIcon] = [] @Published var colorChoices: [AccentIcon] = []
let accentChoices: [String] = [ let accentChoices: [String] = [
"bloo",
"blue",
"green",
"orange",
"pink",
"purple",
"red", "red",
"yellow" "orange",
"yellow",
"green",
"blue",
"bloo",
"purple",
"pink"
] ]
@Published var device: (sf: String, label: String) @Published var device: (sf: String, label: String)
@@ -187,11 +187,6 @@ class SettingsViewModel: ObservableObject {
if self.settings.prevAppVersion != getVersion()+getBuildID() { if self.settings.prevAppVersion != getVersion()+getBuildID() {
self.settings.showWhatsNew = true self.settings.showWhatsNew = true
} }
//
// for color in accentChoices {
// self.colorChoices.append(AccentIcon(color))
// }
} }
func saveSettings() { func saveSettings() {

View File

@@ -70,15 +70,6 @@ struct HomeView: View {
if filteredEvents.isEmpty && !searchInput.isEmpty { if filteredEvents.isEmpty && !searchInput.isEmpty {
HelpView(searchInput: $searchInput, focusedField: focusedField) HelpView(searchInput: $searchInput, focusedField: focusedField)
} else { } else {
// ForEach(settingsModel.iconChoices, id: \.self) { image in
// Image(uiImage: UIImage(named: darkMode ? image+"Dark" : image)!)
// .resizable()
// .scaledToFit()
// .frame(width: 50)
// .onTapGesture {
// settingsModel.changeAccent(to: image)
// }
// }
ScrollView { ScrollView {
ForEach(filteredEvents) { event in ForEach(filteredEvents) { event in
EventListView(viewModel: viewModel, event: event) EventListView(viewModel: viewModel, event: event)
@@ -136,10 +127,3 @@ struct HomeView: View {
settingsModel: dummySettingsViewModel() settingsModel: dummySettingsViewModel()
) )
} }
func changeIcon(to iconName: String?) {
guard UIApplication.shared.supportsAlternateIcons else { return }
UIApplication.shared.setAlternateIconName(iconName) {error in
print(error as Any)
}
}

View File

@@ -41,6 +41,11 @@ struct SettingsView: View {
} }
func changeIcon(to: String) { func changeIcon(to: String) {
guard UIApplication.shared.supportsAlternateIcons else {
print("doesnt tsupport alternate icons")
return
}
print(UIApplication.shared.supportsAlternateIcons)
guard !(to == "orange") else { guard !(to == "orange") else {
UIApplication.shared.setAlternateIconName(nil) UIApplication.shared.setAlternateIconName(nil)
return return