Explorar o código

Open Network Stream: don't add unique stream to history multiple times

Felix Paul Kühne %!s(int64=12) %!d(string=hai) anos
pai
achega
0f090da739
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      AspenProject/VLCOpenNetworkStreamViewController.m

+ 4 - 0
AspenProject/VLCOpenNetworkStreamViewController.m

@@ -93,9 +93,13 @@
 {
     if ([self.urlField.text length] > 0) {
         if (!self.privateToggleSwitch.on) {
+            if ([_recentURLs indexOfObject:self.urlField.text] != NSNotFound)
+                [_recentURLs removeObject:self.urlField.text];
+
             if (_recentURLs.count >= 15)
                 [_recentURLs removeLastObject];
             [_recentURLs addObject:self.urlField.text];
+
             [self.historyTableView reloadData];
         }
         [self _openURLStringAndDismiss:self.urlField.text];