Store animation-settings in UserDefaults, too (IOS-14)

Because why not?
This commit is contained in:
Nathan Mattes 2023-06-30 21:14:44 +02:00
parent 67e3078df9
commit 1f1d8587e0
1 changed files with 4 additions and 0 deletions

View File

@ -108,8 +108,12 @@ extension SettingsCoordinator: ASWebAuthenticationPresentationContextProviding {
extension SettingsCoordinator: GeneralSettingsViewControllerDelegate {
func save(_ viewController: UIViewController, setting: Setting, viewModel: GeneralSettingsViewModel) {
UserDefaults.shared.customUserInterfaceStyle = viewModel.selectedAppearence.interfaceStyle
setting.update(preferredStaticEmoji: viewModel.playAnimations == false)
setting.update(preferredStaticAvatar: viewModel.playAnimations == false)
UserDefaults.shared.preferredStaticEmoji = viewModel.playAnimations == false
UserDefaults.shared.preferredStaticAvatar = viewModel.playAnimations == false
setting.update(preferredUsingDefaultBrowser: viewModel.selectedOpenLinks == .browser)
}
}