Dimillian / IceCubesApp

A SwiftUI Mastodon client
https://apps.apple.com/us/app/ice-cubes-for-mastodon/id6444915884
GNU Affero General Public License v3.0
5.53k stars 539 forks source link

Bug: View to compose a new post opens with wrong theme when called via share from a different app #459

Open sothawo opened 1 year ago

sothawo commented 1 year ago

I have set my theme to "nemesis" so links are displayed in blue instead of the default violet (if that's the correct english name).

When in a different application, for example in Firefox, I want to share something by going to the share menu there, and then select Ice Cubes from the list of applications, Ice Cubes displays the compose window in the default theme with violet links.

This happens as well when I use the new "open in Ice Cubes" entry in Safari (which I normally don't use)

PrajeetShrestha commented 1 year ago

@Dimillian we can fix by putting the suiteName example:

@AppStorage(ThemeKey.selectedScheme.rawValue, store: UserDefaults(suiteName: "group.com.thomasricouard.IceCubesApp")) public var selectedScheme: ColorScheme = .dark

I couldn't figure out how to make it dynamic according to the .xcconfig file though, the suiteName works only if it's strictly string literal.