Commit 244ac26b authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

iOS ONS: micro-optimization

parent 2d782c46
......@@ -169,12 +169,13 @@
if ([self.urlField.text length] > 0) {
if (!self.privateToggleSwitch.on) {
if ([_recentURLs indexOfObject:self.urlField.text] != NSNotFound)
[_recentURLs removeObject:self.urlField.text];
NSString *urlString = self.urlField.text;
if ([_recentURLs indexOfObject:urlString] != NSNotFound)
[_recentURLs removeObject:urlString];
if (_recentURLs.count >= 100)
[_recentURLs removeLastObject];
[_recentURLs addObject:self.urlField.text];
[_recentURLs addObject:urlString];
[[NSUbiquitousKeyValueStore defaultStore] setArray:_recentURLs forKey:kVLCRecentURLs];
[self.historyTableView reloadData];
Supports Markdown
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