Changeset 3591

Show
Ignore:
Timestamp:
03/01/07 10:43:00 (2 years ago)
Author:
jmmv
Message:

Update the initial channel when disconnecting so a further reconnection
returns us to the channel we were in before. (The most obvious utility
of this is restoring the session when resuming the computer from sleep.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Chat Core/MVICBChatConnection.m

    r3588 r3591  
    547547                [_room _clearBannedUsers]; 
    548548 
     549                // Update the initial channel to point to the joined room so that 
     550                // a reconnect after a disconnection works fine and rejoins us to 
     551                // the (only) room that we left. 
     552                MVSafeCopyAssign( &_initialChannel, name ); 
     553 
    549554                [[NSNotificationCenter defaultCenter] 
    550555                 postNotificationOnMainThreadWithName:MVChatRoomJoinedNotification 
     
    877882        [self _markUserAsOnline:_localUser]; 
    878883 
    879         [_room release]; 
    880884        _room = (MVICBChatRoom *)[self chatRoomWithUniqueIdentifier:_initialChannel]; 
    881885        [_room _setDateJoined:[NSDate date]];