Commit 0f090da7 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

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

parent 71afd722
...@@ -93,9 +93,13 @@ ...@@ -93,9 +93,13 @@
{ {
if ([self.urlField.text length] > 0) { if ([self.urlField.text length] > 0) {
if (!self.privateToggleSwitch.on) { if (!self.privateToggleSwitch.on) {
if ([_recentURLs indexOfObject:self.urlField.text] != NSNotFound)
[_recentURLs removeObject:self.urlField.text];
if (_recentURLs.count >= 15) if (_recentURLs.count >= 15)
[_recentURLs removeLastObject]; [_recentURLs removeLastObject];
[_recentURLs addObject:self.urlField.text]; [_recentURLs addObject:self.urlField.text];
[self.historyTableView reloadData]; [self.historyTableView reloadData];
} }
[self _openURLStringAndDismiss:self.urlField.text]; [self _openURLStringAndDismiss:self.urlField.text];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment