// // XSUser.m // XenonSDK // // Created by SAGESSE on 2019/5/29. // Copyright © 2019 SAGESSE. All rights reserved. // #import "XSUser.h" #import "XSDataCenter.h" @implementation XSUser + (BOOL)propertyIsOptional:(NSString *)propertyName { return YES; } NSArray* g_history; + (void)setHistory:(NSArray *)history { [XSDataCenter setValue:history forKey:@"User.history"]; g_history = history; } + (NSArray*)history { if (g_history != nil) { return g_history; } g_history = [XSDataCenter valueForKey:@"User.history"]; return g_history; } - (NSString*)name { return self.account ?: self.userName ?: self.uid; } @end