Changeset 4834
- Timestamp:
- 06/09/07 20:10:18 (1 year ago)
- Files:
-
- WiredClient/trunk/WCNews.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCNews.m
r4799 r4834 38 38 - (void)_validate; 39 39 - (void)_reloadNews; 40 - (void)_readAllPosts; 40 41 41 42 - (NSAttributedString *)_postWithNick:(NSString *)nick date:(NSDate *)date message:(NSString *)message; … … 121 122 122 123 [[self connection] sendCommand:WCNewsCommand]; 124 } 125 126 127 128 - (void)_readAllPosts { 129 while(_unread > 0) { 130 _unread--; 131 132 [[self connection] postNotificationName:WCNewsDidReadPost object:[self connection]]; 133 } 123 134 } 124 135 … … 196 207 197 208 - (void)windowDidBecomeKey:(NSNotification *)notification { 198 while(_unread > 0) { 199 _unread--; 200 201 [[self connection] postNotificationName:WCNewsDidReadPost object:[self connection]]; 202 } 209 [self _readAllPosts]; 203 210 } 204 211 … … 224 231 225 232 - (void)connectionWillTerminate:(NSNotification *)notification { 233 [self _readAllPosts]; 234 226 235 [self close]; 227 236 [self autorelease];
