Changeset 3510
- Timestamp:
- 12/30/06 19:04:43 (2 years ago)
- Files:
-
- trunk/Models/JVBuddy.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Models/JVBuddy.m
r3509 r3510 262 262 263 263 - (void) setActiveUser:(MVChatUser *) user { 264 if( [_activeUser isEqual:user] ) 265 return; 266 264 267 id old = _activeUser; 265 268 _activeUser = [user retain]; 266 269 [old release]; 270 271 [[NSNotificationCenter defaultCenter] postNotificationName:JVBuddyActiveUserChangedNotification object:self userInfo:nil]; 267 272 } 268 273 … … 570 575 [self setActiveUser:user]; 571 576 577 [[NSNotificationCenter defaultCenter] postNotificationName:JVBuddyUserCameOnlineNotification object:self userInfo:[NSDictionary dictionaryWithObject:user forKey:@"user"]]; 578 572 579 if( cameOnline ) 573 580 [[NSNotificationCenter defaultCenter] postNotificationName:JVBuddyCameOnlineNotification object:self userInfo:nil]; … … 583 590 [self setActiveUser:[_users anyObject]]; 584 591 592 [[NSNotificationCenter defaultCenter] postNotificationName:JVBuddyUserWentOfflineNotification object:self userInfo:[NSDictionary dictionaryWithObject:user forKey:@"user"]]; 593 585 594 if( ! [_users count] ) 586 595 [[NSNotificationCenter defaultCenter] postNotificationName:JVBuddyWentOfflineNotification object:self userInfo:nil]; … … 589 598 - (void) _buddyIdleUpdate:(NSNotification *) notification { 590 599 MVChatUser *user = [notification object]; 591 NSNotification *note = [NSNotification notificationWithName:JVBuddyUserIdleTimeUpdatedNotification object:self userInfo:[NSDictionary dictionaryWithObject sAndKeys:user, @"user", nil]];600 NSNotification *note = [NSNotification notificationWithName:JVBuddyUserIdleTimeUpdatedNotification object:self userInfo:[NSDictionary dictionaryWithObject:user forKey:@"user"]]; 592 601 [[NSNotificationQueue defaultQueue] enqueueNotification:note postingStyle:NSPostASAP coalesceMask:( NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender ) forModes:nil]; 593 602 }
