Only keep track of last-seen dates for contacts we're actually interested in. adium-1.5.4
authorThijs Alkemade <thijsalkemade@gmail.com>
Tue, 14 Aug 2012 02:16:06 +0200
branchadium-1.5.4
changeset 4998973612acf8df
parent 4995 0083bb897bbd
child 4999 6157383640c2
Only keep track of last-seen dates for contacts we're actually interested in.

This was a massive hit to memory use and startup time.
Source/CBContactLastSeenPlugin.m
     1.1 --- a/Source/CBContactLastSeenPlugin.m	Mon Aug 13 00:02:48 2012 +0200
     1.2 +++ b/Source/CBContactLastSeenPlugin.m	Tue Aug 14 02:16:06 2012 +0200
     1.3 @@ -45,7 +45,7 @@
     1.4  - (NSSet *)updateListObject:(AIListObject *)inObject keys:(NSSet *)inModifiedKeys silent:(BOOL)silent
     1.5  {
     1.6  	/* Update only for contacts whose online status has changed */
     1.7 -	if ([inObject isKindOfClass:[AIListContact class]]) {
     1.8 +	if ([inObject isKindOfClass:[AIListContact class]] && !inObject.isStranger) {
     1.9  		if ([inModifiedKeys containsObject:@"isOnline"]) {
    1.10  			if (inObject.online) {
    1.11  				//Either they are online, or we've come online. Either way, update both their status and the time