@@ -10,6 +10,7 @@ var Commit = function(obj) {
1010	this . sha  =  obj . realSha ( ) ; 
1111	this . parents  =  obj . parents ; 
1212	this . subject  =  obj . subject ; 
13+ 	this . notificationID  =  null ; 
1314
1415	// TODO: 
1516	// this.author_date instant 
@@ -168,11 +169,12 @@ var loadCommit = function(commitObject, currentRef) {
168169	// Which will be called from the controller once 
169170	// the commit details are in. 
170171
172+ 	if  ( commit  &&  commit . notificationID ) 
173+ 		clearTimeout ( commit . notificationID ) ; 
174+ 
171175	commit  =  new  Commit ( commitObject ) ; 
172176	commit . currentRef  =  currentRef ; 
173177
174- 	notify ( "Loading commit…" ,  0 ) ; 
175- 
176178	$ ( "commitID" ) . innerHTML  =  commit . sha ; 
177179	$ ( "authorID" ) . innerHTML  =  commit . author_name ; 
178180	$ ( "subjectID" ) . innerHTML  =  commit . subject . escapeHTML ( ) ; 
@@ -202,6 +204,13 @@ var loadCommit = function(commitObject, currentRef) {
202204			"<a href='' onclick='selectCommit(this.innerHTML); return false;'>"  + 
203205			commit . parents [ i ]  +  "</a></td>" ; 
204206	} 
207+ 
208+ 	commit . notificationID  =  setTimeout ( function ( )  {  
209+ 		if  ( ! commit . fullyLoaded ) 
210+ 			notify ( "Loading commit…" ,  0 ) ; 
211+ 		commit . notificationID  =  null ; 
212+ 	} ,  500 ) ; 
213+ 
205214} 
206215
207216var  showDiff  =  function ( )  { 
@@ -282,6 +291,11 @@ var loadCommitDetails = function(data)
282291{ 
283292	commit . parseDetails ( data ) ; 
284293
294+ 	if  ( commit . notificationID ) 
295+ 		clearTimeout ( commit . notificationID ) 
296+ 	else 
297+ 		$ ( "notification" ) . style . display  =  "none" ; 
298+ 
285299	var  formatEmail  =  function ( name ,  email )  { 
286300		return  email  ? name  +  " <<a href='mailto:"  +  email  +  "'>"  +  email  +  "</a>>"  : name ; 
287301	} 
0 commit comments