Procházet zdrojové kódy

Fix bugs in collection and defaults content sections

FLEXCollectionContentSection and FLEXDefaultsContentSection
Tanner Bennett před 6 roky
rodič
revize
805434239a

+ 4 - 4
Classes/ObjectExplorers/Sections/FLEXCollectionContentSection.m

@@ -81,7 +81,7 @@ typedef NS_ENUM(NSUInteger, FLEXCollectionType) {
         case FLEXUnorderedCollection:
             return [self describe:[self objectForRow:row]];
         case FLEXKeyedCollection:
-            return [self describe:self.collection.allKeys[row]];
+            return [self describe:self.cachedCollection.allKeys[row]];
 
         case FLEXUnsupportedCollection:
             return nil;
@@ -112,11 +112,11 @@ typedef NS_ENUM(NSUInteger, FLEXCollectionType) {
 - (id)objectForRow:(NSInteger)row {
     switch (self.collectionType) {
         case FLEXOrderedCollection:
-            return self.collection[row];
+            return self.cachedCollection[row];
         case FLEXUnorderedCollection:
-            return self.collection.allObjects[row];
+            return self.cachedCollection.allObjects[row];
         case FLEXKeyedCollection:
-            return self.collection[self.collection.allKeys[row]];
+            return self.cachedCollection[self.cachedCollection.allKeys[row]];
 
         case FLEXUnsupportedCollection:
             return nil;

+ 2 - 2
Classes/ObjectExplorers/Sections/FLEXDefaultsContentSection.m

@@ -29,10 +29,10 @@
 
 + (instancetype)forDefaults:(NSUserDefaults *)userDefaults {
     FLEXDefaultsContentSection *section = [self forReusableFuture:^id(FLEXDefaultsContentSection *section) {
+        section.defaults = userDefaults;
+        section.onlyShowKeysForAppPrefs = YES;
         return section.whitelistedDefaults;
     }];
-
-    section.defaults = userDefaults;
     return section;
 }