Skip to content

Commit

Permalink
feature: sort by file path
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhy committed Jul 20, 2017
1 parent db36dba commit c309356
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 c309356

Please sign in to comment.