Просмотр исходного кода

Update network history UI when the recorder is cleared.

Ryan Olson лет назад: 11
Родитель
Сommit
ec98b0cba6
1 измененных файлов с 6 добавлено и 0 удалено
  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