Created
February 23, 2012 02:15
-
-
Save mrsidique/1889242 to your computer and use it in GitHub Desktop.
Zap UI Blockage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (PFObject *card in objects) { | |
| PFObject *cards = [card objectForKey:@"card"]; | |
| PFObject *userID = [[[card objectForKey:@"card"] objectForKey:@"cardOwner"] objectForKey:@"username"]; | |
| NSString *currentUserNameString = [NSString stringWithFormat:@"%@", [currentUser objectForKey:@"username"]]; | |
| NSString *fetchedUserNameString = [NSString stringWithFormat:@"%@", userID]; | |
| if ([card objectForKey:@"card"] != nil) { | |
| //only get cards if they are currently set to broadcasting | |
| if ([[[card objectForKey:@"card"]objectForKey:@"active"]isEqualToString:@"1"]) { | |
| if ([[[card objectForKey:@"card"]objectForKey:@"broadcasting"]isEqualToString:@"1"]) { | |
| if (![currentUserNameString isEqualToString:fetchedUserNameString]) { | |
| NSTimeInterval timeSinceLastUpdate = [card.updatedAt timeIntervalSinceNow]; | |
| //only display users if they've checked in less than 30 minutes ago | |
| if (timeSinceLastUpdate > -1800) { | |
| [resultSet addObject:cards]; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment