InfiniTimeOrg / InfiniLink

The official iOS companion app for InfiniTime
https://apps.apple.com/us/app/infinilink/id1582318814
GNU General Public License v3.0
202 stars 22 forks source link

The first time the install_older_version will not show until the ShowNewDownloadsOnly option toggle. #84

Closed poormusic2001 closed 1 year ago

poormusic2001 commented 1 year ago

If the user don't toggle the "ShowNewDownloadsOnly" in the settings, then the UserDefaults.standard.value(forKey: "showNewDownloadsOnly") will return nil. If it return nil, the default value will use true, then the "install_older_version" will not show until the user turn on and turn off the "ShowNewDownloadsOnly" in the settings once. The UserDefaults will get the value so that the UI show the option.

Fix it by using AppStorage.