Changeset 6 for Trunk/AILogSizeSort.m
- Timestamp:
- 09/28/08 22:53:31 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Trunk/AILogSizeSort.m
r5 r6 30 30 - (void)didBecomeActiveFirstTime 31 31 { 32 logSizeCache = [NSMutableDictionary dictionaryWithCapacity:64]; 33 32 34 NSEnumerator *groupEnumerator = [[[[adium contactController] contactList] listContacts] objectEnumerator]; 33 35 … … 36 38 while(group = [groupEnumerator nextObject]) 37 39 { 38 AILog(@"%@", group);40 NSEnumerator *contactEnumerator = [[group listContacts] objectEnumerator]; 39 41 40 NS Enumerator *contactEnumerator = [[group listContacts] objectEnumerator];42 NSMutableDictionary *sizes = [NSMutableDictionary dictionaryWithCapacity:64]; 41 43 42 44 while(contact = [contactEnumerator nextObject]) 43 45 { 44 AILog(@"\t%@: %lld", contact, [AILogSizeSort getContactLogSize:contact]);46 [sizes setValue:[NSNumber numberWithUnsignedLongLong:[AILogSizeSort getContactLogSize:contact]] forKey:[contact UID]]; 45 47 } 48 49 [logSizeCache setValue:sizes forKey:[group UID]]; 46 50 } 51 52 AILog(@"Log size cache:"); 53 AILog(@"%@", logSizeCache); 47 54 } 48 55 … … 114 121 int logSizeSort(id objectA, id objectB, BOOL groups) 115 122 { 116 // Not real excited about doing this with an implicit definition, but seems to be117 // the only option for now.118 //AILog([objectA formattedUID]);119 123 return NSOrderedAscending; 120 124 }