From 3e43d29a998918b781dd4ac3c71ce5ce07669a6b Mon Sep 17 00:00:00 2001 From: Sebastian Staudt Date: Thu, 14 May 2015 12:00:55 +0200 Subject: [PATCH] Optimized reloading of inventory list when changing settings --- Suitcase/Classes/SCGamesViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Suitcase/Classes/SCGamesViewController.m b/Suitcase/Classes/SCGamesViewController.m index d96a855..ff9e9a6 100644 --- a/Suitcase/Classes/SCGamesViewController.m +++ b/Suitcase/Classes/SCGamesViewController.m @@ -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];