|
@@ -545,14 +545,22 @@ NSPopoverDelegate>
|
|
|
}
|
|
|
|
|
|
- (IBAction)personalCenterAction:(NSButton *)sender {
|
|
|
- // 用户头像点击事件
|
|
|
- self.userMenu = [[NSMenu alloc] init];
|
|
|
- KMUserInfoViewController *userInfo = [[KMUserInfoViewController alloc] init];
|
|
|
- NSMenuItem *item = [self.userMenu addItemWithTitle:@"" action:nil target:@""];
|
|
|
- item.target = self;
|
|
|
- item.representedObject = userInfo;
|
|
|
- item.view = userInfo.view;
|
|
|
- [self.userMenu popUpMenuPositioningItem:nil atLocation:NSMakePoint(-130, 30) inView:sender];
|
|
|
+ [KMUserInfoViewController refreshTokenUserInfoWithCallback:^(BOOL success) {
|
|
|
+ if(success) {
|
|
|
+ if([KMMemberInfo shared].isLogin == YES) {
|
|
|
+ // 用户头像点击事件
|
|
|
+ self.userMenu = [[NSMenu alloc] init];
|
|
|
+ KMUserInfoViewController *userInfo = [[KMUserInfoViewController alloc] init];
|
|
|
+ NSMenuItem *item = [self.userMenu addItemWithTitle:@"" action:nil target:@""];
|
|
|
+ item.target = self;
|
|
|
+ item.representedObject = userInfo;
|
|
|
+ item.view = userInfo.view;
|
|
|
+ [self.userMenu popUpMenuPositioningItem:nil atLocation:NSMakePoint(-130, 30) inView:sender];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- (IBAction)signUpAction:(NSButton *)sender {
|