mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-06 05:37:48 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// RBCatalogMasterController.m
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ariel Lichtin on 9/3/14.
|
||||
// Copyright (c) 2014 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RBWebProfileViewController.h"
|
||||
#import "RobloxTheme.h"
|
||||
#import "RobloxInfo.h"
|
||||
#import "UserInfo.h"
|
||||
#import "LoginManager.h"
|
||||
#import "RobloxNotifications.h"
|
||||
#import "RBXFunctions.h"
|
||||
|
||||
@interface RBWebProfileViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation RBWebProfileViewController
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.navigationItem.title = NSLocalizedString(@"ProfileWord", nil);
|
||||
|
||||
|
||||
NSString* profileURL = [NSString stringWithFormat:@"%@users/%@/profile", [RobloxInfo getWWWBaseUrl], _userId.stringValue];
|
||||
[self loadURL:profileURL screenURL:NO];
|
||||
|
||||
if ([[UserInfo CurrentPlayer] userLoggedIn])
|
||||
[self addNavBarButtons:nil];
|
||||
else
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addNavBarButtons:) name:RBX_NOTIFY_LOGIN_SUCCEEDED object:nil];
|
||||
|
||||
[self addSearchIconWithSearchType:SearchResultUsers andFlurryEvent:nil];
|
||||
}
|
||||
|
||||
-(void) addNavBarButtons:(NSNotification*)notification
|
||||
{
|
||||
[RBXFunctions dispatchOnMainThread:^{
|
||||
[self addRobuxIconWithFlurryEvent:nil
|
||||
andBCIconWithFlurryEvent:nil];
|
||||
|
||||
if (notification)
|
||||
[self reloadWebPage];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:RBX_NOTIFY_LOGIN_SUCCEEDED object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeIcons:) name:RBX_NOTIFY_LOGGED_OUT object:nil];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void) removeIcons:(NSNotification*) notification
|
||||
{
|
||||
[RBXFunctions dispatchOnMainThread:^{
|
||||
[self removeRobuxAndBCIcons];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:RBX_NOTIFY_LOGGED_OUT object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addNavBarButtons:) name:RBX_NOTIFY_LOGIN_SUCCEEDED object:nil];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user