Skip to content

Commit

Permalink
Merge pull request tinymind#29 from nathanwhy/master
Browse files Browse the repository at this point in the history
feature: sort by file path
  • Loading branch information
tinymind authored Jul 20, 2017
2 parents db36dba + 77a43ea commit a901799
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion LSUnusedResources/ViewController/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,13 @@ - (void)tableView:(NSTableView *)tableView mouseDownInHeaderOfTableColumn:(NSTab
}];
self.unusedResults = [array mutableCopy];
[self.resultsTableView reloadData];
}
} else if ([tableColumn.identifier isEqualToString:kResultIdentifyFilePath]){
NSArray *array = [self.unusedResults sortedArrayUsingComparator:^NSComparisonResult(ResourceFileInfo *obj1, ResourceFileInfo *obj2) {
return [obj1.path compare:obj2.path];
}];
self.unusedResults = [array mutableCopy];
[self.resultsTableView reloadData];
}
}

#pragma mark - <NSTextFieldDelegate>
Expand Down

0 comments on commit a901799

Please sign in to comment.