Sfoglia il codice sorgente

Update network history UI when the recorder is cleared.

Ryan Olson 11 anni fa
parent
commit
ec98b0cba6
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      Classes/Network/FLEXNetworkHistoryTableViewController.m

+ 6 - 0
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -33,6 +33,7 @@
     if (self) {
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNewTransactionRecordedNotification:) name:kFLEXNetworkRecorderNewTransactionNotification object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleTransactionUpdatedNotification:) name:kFLEXNetworkRecorderTransactionUpdatedNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleTransactionsClearedNotification:) name:kFLEXNetworkRecorderTransactionsClearedNotification object:nil];
         self.title = @"📡  Network";
     }
     return self;
@@ -192,6 +193,11 @@
     }
 }
 
+- (void)handleTransactionsClearedNotification:(NSNotification *)notification
+{
+    [self updateTransactions];
+}
+
 #pragma mark - Table view data source
 
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView