Skip to content

The new Preferences API and the old UserSettings #294

Answered by mickael-menu
morismoris asked this question in Q&A
Discussion options

You must be logged in to vote

Did you do the HTTP server migration? If you want to keep using the old updateUserSettingsStyle() API, you need to keep the old HTTP server. After doing the HTTP server migration, the new Preferences API is required.

I didn't try it, but if you want to bridge the legacy UserSettings with the new EPUBPreferences, I think you should be able to do:

// Saves to the UserDefaults
userSettings.save()
// Loads from the UserDefaults
let preferences = EPUBPreferences.fromLegacyPreferences()
navigator.submitPreferences(preferences)

See

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by morismoris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants