Skip to content

Commit

Permalink
Optimized reloading of inventory list when changing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
koraktor committed May 14, 2015
1 parent db4da1a commit 3e43d29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Suitcase/Classes/SCGamesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ - (void)settingsChanged:(NSNotification *)notification {
NSArray *inventories = [[SCAbstractInventory inventoriesForUser:steamId64] allValues];
NSMutableArray *newInventories = [NSMutableArray arrayWithCapacity:inventories.count];

if (![notification.userInfo.allKeys containsObject:@"skip_empty_inventories"] &&
![notification.userInfo.allKeys containsObject:@"skip_failed_inventories"]) {
return;
}

BOOL skipEmptyInventories = [[[NSUserDefaults standardUserDefaults] valueForKey:@"skip_empty_inventories"] boolValue];
BOOL skipFailedInventories = [[[NSUserDefaults standardUserDefaults] valueForKey:@"skip_failed_inventories"] boolValue];

Expand Down

0 comments on commit 3e43d29

Please sign in to comment.