Skip to content

Commit

Permalink
Fix not asking for more languages
Browse files Browse the repository at this point in the history
  • Loading branch information
duemunk committed Dec 17, 2014
1 parent 240232f commit 4078c02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions BeMyEyes/Source/Controllers/BMEMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ - (void)viewDidLoad {
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];

[self check];
[self checkAccess];
[self askForMoreLanguagesIfNecessary];
}

- (void)handleAppBecameActive
{
[self check];
[self checkAccess];
}

- (void)check
- (void)checkAccess
{
[self askForMoreLanguagesIfNecessary];
if ([BMEClient sharedClient].currentUser.role == BMERoleHelper) {
[BMEAccessControlHandler hasNotificationsEnabled:^(BOOL isUserEnabled, BOOL validToken) {
if (isUserEnabled) {
Expand Down Expand Up @@ -150,7 +150,7 @@ - (void)displayMainControllerWithIdentifier:(NSString *)identifier {
}

- (void)askForMoreLanguagesIfNecessary {
if ([GVUserDefaults standardUserDefaults].peopleHelped >= BMEPeopleHelpedBeforeAskingForMoreLanguages &&
if ([BMEClient sharedClient].currentUser.peopleHelped.integerValue >= BMEPeopleHelpedBeforeAskingForMoreLanguages &&
![GVUserDefaults standardUserDefaults].hasAskedForMoreLanguages) {
NSString *title, *message, *cancelButton, *confirmButton;
if ([[BMEClient sharedClient].currentUser isHelper]) {
Expand Down
5 changes: 0 additions & 5 deletions BeMyEyes/Source/Controllers/BMEReportAbuseViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ - (void)viewDidLoad {
[super viewDidLoad];

[MKLocalization registerForLocalization:self];

if ([[BMEClient sharedClient].currentUser isHelper]) {
NSUInteger peopleHelped = [GVUserDefaults standardUserDefaults].peopleHelped;
[GVUserDefaults standardUserDefaults].peopleHelped = peopleHelped + 1;
}
}

- (void)dealloc {
Expand Down

0 comments on commit 4078c02

Please sign in to comment.