Skip to content

Commit

Permalink
Add support for IRCWorld.markAllAsRead: to be limited to a single ser…
Browse files Browse the repository at this point in the history
…ver.
  • Loading branch information
emsquared committed Aug 12, 2012
1 parent 812b4f4 commit ac481a1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Classes/Headers/IRCWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
- (BOOL)inputText:(id)str command:(NSString *)command;

- (void)markAllAsRead;
- (void)markAllAsRead:(IRCClient *)limitedClient;

- (void)markAllScrollbacks;

- (void)updateIcon;
Expand Down
2 changes: 1 addition & 1 deletion Classes/IRC/IRCClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
9 changes: 9 additions & 0 deletions Classes/IRC/IRCWorld.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.1p3</string>
<string>2.1.1-rc1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -33,7 +33,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.1.1 Preview 3</string>
<string>2.1.1 Release Canidate 1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -47,8 +47,8 @@
<key>TXBundleBuildCodeName</key>
<string>Turtle Soup</string>
<key>TXBundleBuildNumber</key>
<string>12347</string>
<string>12350</string>
<key>TXBundleBuildReference</key>
<string>2.1.1p3-308-gf65a2bc-stdbuild</string>
<string>2.1.1-rc1-309-g812b4f4-appstore</string>
</dict>
</plist>

0 comments on commit ac481a1

Please sign in to comment.