From ac481a14ae9cb7bd80f0e1b704935493fec77819 Mon Sep 17 00:00:00 2001 From: emsquared Date: Sat, 11 Aug 2012 22:06:47 -0400 Subject: [PATCH] Add support for IRCWorld.markAllAsRead: to be limited to a single server. --- Classes/Headers/IRCWorld.h | 2 ++ Classes/IRC/IRCClient.m | 2 +- Classes/IRC/IRCWorld.m | 9 +++++++++ Resources/Info.plist | 8 ++++---- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Classes/Headers/IRCWorld.h b/Classes/Headers/IRCWorld.h index 7ff02c2c74..0595d3281a 100755 --- a/Classes/Headers/IRCWorld.h +++ b/Classes/Headers/IRCWorld.h @@ -109,6 +109,8 @@ - (BOOL)inputText:(id)str command:(NSString *)command; - (void)markAllAsRead; +- (void)markAllAsRead:(IRCClient *)limitedClient; + - (void)markAllScrollbacks; - (void)updateIcon; diff --git a/Classes/IRC/IRCClient.m b/Classes/IRC/IRCClient.m index 4d0d28c3e3..67cc8ed042 100755 --- a/Classes/IRC/IRCClient.m +++ b/Classes/IRC/IRCClient.m @@ -2318,7 +2318,7 @@ - (BOOL)sendCommand:(id)str completeTarget:(BOOL)completeTarget target:(NSString [self.world updateIcon]; [self.world reloadTree]; - [self.world markAllAsRead]; + [self.world markAllAsRead:self]; } else { [self.world destroyAllEvidence]; } diff --git a/Classes/IRC/IRCWorld.m b/Classes/IRC/IRCWorld.m index 24f79c12ce..ba5f416791 100755 --- a/Classes/IRC/IRCWorld.m +++ b/Classes/IRC/IRCWorld.m @@ -277,8 +277,17 @@ - (BOOL)inputText:(id)str command:(NSString *)command } - (void)markAllAsRead +{ + [self markAllAsRead:nil]; +} + +- (void)markAllAsRead:(IRCClient *)limitedClient { for (IRCClient *u in self.clients) { + if (PointerIsNotEmpty(limitedClient) && NSDissimilarObjects(u, limitedClient)) { + continue; + } + u.isUnread = NO; for (IRCChannel *c in u.channels) { diff --git a/Resources/Info.plist b/Resources/Info.plist index 53f1bfa3af..5ecfd4d02d 100755 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.1p3 + 2.1.1-rc1 CFBundleURLTypes @@ -33,7 +33,7 @@ CFBundleVersion - 2.1.1 Preview 3 + 2.1.1 Release Canidate 1 LSApplicationCategoryType public.app-category.social-networking LSMinimumSystemVersion @@ -47,8 +47,8 @@ TXBundleBuildCodeName Turtle Soup TXBundleBuildNumber - 12347 + 12350 TXBundleBuildReference - 2.1.1p3-308-gf65a2bc-stdbuild + 2.1.1-rc1-309-g812b4f4-appstore