adium-1.4 3136:f314f15eef4c: This should prevent an account sign...

commits at adium.im commits at adium.im
Wed Oct 27 01:51:21 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/f314f15eef4c
revision:	3136:f314f15eef4c
author:		Evan Schoenberg
date:		Tue Oct 26 20:51:16 2010 -0500

This should prevent an account signing off or a contact leaving a chat from making another account's signon take forever beecause the list object notification delay until inactivity was no longer active. Restore it when endListObjectNotificationsDelaysImmediately is called, if it was active before.

diffs (40 lines):

diff -r 5d4fe0d52713 -r f314f15eef4c Frameworks/Adium Framework/Source/AIContactObserverManager.m
--- a/Frameworks/Adium Framework/Source/AIContactObserverManager.m	Sun Oct 24 21:40:26 2010 -0500
+++ b/Frameworks/Adium Framework/Source/AIContactObserverManager.m	Tue Oct 26 20:51:16 2010 -0500
@@ -107,12 +107,8 @@
 {
 	if (delayedUpdateRequests > 0) {
 		delayedUpdateRequests--;
-		if (delayedUpdateRequests == 0) {
-			if (delayedUpdateTimer)
-				[delayedUpdateTimer invalidate]; self.delayedUpdateTimer = nil;
-			
+		if (delayedUpdateRequests == 0)
 			[self _performDelayedUpdates:nil];
-		}
 	}
 }
 
@@ -130,10 +126,21 @@
  */
 - (void)endListObjectNotificationsDelaysImmediately
 {
+	RPLogWithSignature(@"");
+
 	if (delayedUpdateRequests) {
-		delayedUpdateRequests = 0;	
+		delayedUpdateRequests = 0;
+
+		BOOL restoreDelayUntilInactivity = (self.delayedUpdateTimer != nil);
+		
 		[self.delayedUpdateTimer invalidate]; self.delayedUpdateTimer = nil;
 		[self _performDelayedUpdates:nil];
+		
+		/* After immediately performing updates as requested, go back to delaying until inactivity if that was the
+		 * status quo.
+		 */
+		if (restoreDelayUntilInactivity)
+			[self delayListObjectNotificationsUntilInactivity];
 	}
 }
 




More information about the commits mailing list