adium 2134:b146074b5d45: Fix the "always visible" preference. Ad...
commits at adium.im
commits at adium.im
Mon May 11 01:34:46 UTC 2009
details: http://hg.adium.im/adium/rev/b146074b5d45
revision: 2134:b146074b5d45
author: Zachary West <zacw at adium.im>
date: Sun May 10 21:34:30 2009 -0400
Fix the "always visible" preference. Adds a #warning :(
diffstat:
Frameworks/Adium Framework/Source/AIListObject.m | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r d1ec0dde6808 -r b146074b5d45 Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m Sun May 10 21:10:11 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIListObject.m Sun May 10 21:34:30 2009 -0400
@@ -98,14 +98,15 @@
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath hasSuffix:@"Visible"]) {
- NSNumber *alwaysVisiblePrefValue = [self preferenceForKey:@"Visible" group:PREF_GROUP_ALWAYS_VISIBLE];
+ BOOL alwaysVisibleSelf = [[self preferenceForKey:@"Visible" group:PREF_GROUP_ALWAYS_VISIBLE] boolValue];
+#warning AIListObject should not know of its subclass
// If we're in a meta contact, use the meta contact's preference for visibility.
- if ([self isKindOfClass:[AIListContact class]] && ((AIListContact *)self).metaContact) {
- alwaysVisiblePrefValue = [((AIListContact *)self).metaContact preferenceForKey:@"Visible" group:PREF_GROUP_ALWAYS_VISIBLE];
+ if ([self isKindOfClass:[AIListContact class]]) {
+ alwaysVisibleSelf = alwaysVisibleSelf || [[((AIListContact *)self).parentContact preferenceForKey:@"Visible" group:PREF_GROUP_ALWAYS_VISIBLE] boolValue];
}
-
- alwaysVisible = [alwaysVisiblePrefValue boolValue];
+
+ alwaysVisible = alwaysVisibleSelf;
}
}
More information about the commits
mailing list