Skip to content
Snippets Groups Projects
Commit 6ae588ba authored by Oliver Wiese's avatar Oliver Wiese
Browse files

fix bug in old versions

parent 98fd7189
No related branches found
No related tags found
1 merge request!24Improve mail fetching
......@@ -190,7 +190,16 @@ struct UserManager {
let value = UserDefaults.standard.value(forKey: "\(attribute.rawValue)")
if value != nil {
return value as AnyObject?
} else {
}
if attribute == .accountname {
// fix bug when accountname is missing
if let value = loadUserValue(_:.userAddr) {
storeUserValue(value, attribute: .accountname)
return value
}
return attribute.defaultValue
}
else {
_ = storeUserValue(attribute.defaultValue, attribute: attribute)
return attribute.defaultValue
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment