|
|
@@ -18,7 +18,9 @@
|
|
|
#import "FLEXManager+Private.h"
|
|
|
|
|
|
static __weak UIWindow *s_applicationWindow = nil;
|
|
|
-static NSMutableArray *s_globalEntries = nil;
|
|
|
+
|
|
|
+/// [FLEXGlobalsTableViewControllerEntry *]
|
|
|
+static NSArray *s_defaultGlobalEntries = nil;
|
|
|
|
|
|
typedef NS_ENUM(NSUInteger, FLEXGlobalsRow) {
|
|
|
FLEXGlobalsRowLiveObjects,
|
|
|
@@ -52,7 +54,7 @@ typedef NS_ENUM(NSUInteger, FLEXGlobalsRow) {
|
|
|
}
|
|
|
|
|
|
+ (void)initializeStandardGlobalEntries {
|
|
|
- s_globalEntries = [NSMutableArray array];
|
|
|
+ NSMutableArray *defaultGlobalEntries = [NSMutableArray array];
|
|
|
|
|
|
for (FLEXGlobalsRow defaultRowIndex = 0; defaultRowIndex < FLEXGlobalsRowCount; defaultRowIndex++) {
|
|
|
FLEXGlobalsTableViewControllerEntryNameFuture titleFuture = nil;
|
|
|
@@ -179,8 +181,10 @@ typedef NS_ENUM(NSUInteger, FLEXGlobalsRow) {
|
|
|
NSParameterAssert(titleFuture);
|
|
|
NSParameterAssert(viewControllerFuture);
|
|
|
|
|
|
- [s_globalEntries addObject:[FLEXGlobalsTableViewControllerEntry entryWithNameFuture:titleFuture viewControllerFuture:viewControllerFuture]];
|
|
|
+ [defaultGlobalEntries addObject:[FLEXGlobalsTableViewControllerEntry entryWithNameFuture:titleFuture viewControllerFuture:viewControllerFuture]];
|
|
|
}
|
|
|
+
|
|
|
+ s_defaultGlobalEntries = [defaultGlobalEntries copy];
|
|
|
}
|
|
|
|
|
|
- (id)initWithStyle:(UITableViewStyle)style
|
|
|
@@ -188,7 +192,7 @@ typedef NS_ENUM(NSUInteger, FLEXGlobalsRow) {
|
|
|
self = [super initWithStyle:style];
|
|
|
if (self) {
|
|
|
self.title = @"🌎 Global State";
|
|
|
- _entries = [[s_globalEntries copy] arrayByAddingObjectsFromArray:[FLEXManager sharedManager].userGlobalEntries];
|
|
|
+ _entries = [s_defaultGlobalEntries arrayByAddingObjectsFromArray:[FLEXManager sharedManager].userGlobalEntries];
|
|
|
}
|
|
|
return self;
|
|
|
}
|