Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Dont edit if nothing changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Luecke committed Jan 24, 2011
1 parent 03a3ba7 commit f73593e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Client/IssuesController.j
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,13 @@
- (void)tableView:(CPTableView)aTableView setObjectValue:(id)aValue forTableColumn:(CPTableColumn)tableColumn row:(int)row
{
// go ahead and set the value
var issue = [(filteredIssues || repo[displayedIssuesKey]) objectAtIndex:row];
var issue = [(filteredIssues || repo[displayedIssuesKey]) objectAtIndex:row],
curr = [issue objectValueForKey:"title"];

// Dont update if there's nothing to change...
if (curr === aValue)
return;

[issue setObject:aValue forKey:"title"];
// query github inside callback reload data with github's new title.
[[GithubAPIController sharedController] editIsssue:issue title:aValue body:[issue objectForKey:"body"] repository:repo callback:function(){
Expand Down

0 comments on commit f73593e

Please sign in to comment.