<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,9 +31,12 @@
   return self;
 }
 
+- (void)viewDidLoad {
+  [self showCurrentThread];
+}
+
 - (void)viewWillAppear:(BOOL)animated {
 	[super viewWillAppear:animated];
-  [self showCurrentThread];
 }
 
 
@@ -68,20 +71,34 @@
 
 - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
   UITableViewCell *cell = [[UITableViewCell alloc] init];
-  cell.textColor = [UIColor colorWithWhite:0.7 alpha:1.0];
   
   Post *post = [currentRoot postAtIndex:indexPath.row];
   
-  cell.text = [post preview];
+  // Most recent 10 posts are whiter than the rest
+  float alpha = 0.6;
+  if (post.recentIndex &lt; 10) {
+    alpha = alpha + ((1.0 - alpha) / 10) * (float)(10 - (post.recentIndex));
+  }
+  cell.textColor = [UIColor colorWithWhite:1.0 alpha:alpha];
+  
+  NSLog(@&quot;alpha:%f  index:%d&quot;, alpha, post.recentIndex);
   
-  if (indexPath.row == 0) {
+  // the latest post is bold
+  if (post.recentIndex == 0) {
     cell.font = [UIFont boldSystemFontOfSize:14.0];
   } else {
     cell.font = [UIFont systemFontOfSize:14.0];
   }
   
+  
+  
+  // Set preview text
+  cell.text = [post preview];
+  
   return cell;
 }
+
+
 - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   currentPostIndex = indexPath.row;
   [self showPost:[currentRoot postAtIndex:currentPostIndex]];</diff>
      <filename>Classes/DetailViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -24,6 +24,7 @@
   NSMutableArray *children;
   int depth;
   int cachedReplyCount;
+  int recentIndex;
 }
 
 - (id)initWithXmlElement:(CXMLElement *)xml parent:(Post *)aParent;
@@ -36,6 +37,8 @@
 - (Post *)postAtIndex:(int)index;
 - (NSString *)cleanString:(NSString *)string;
 
+- (int)compare:(Post *)otherPost;
+
 @property (readwrite, retain) Post *parent;
 @property (readwrite, copy) NSString *author;
 @property (readwrite, copy) NSString *preview;
@@ -47,5 +50,6 @@
 @property (readwrite, assign) int depth;
 @property (readwrite, assign) int cachedReplyCount;
 @property (readonly) NSString *formattedDate;
+@property (readwrite) int recentIndex;
 
 @end</diff>
      <filename>Classes/Post.h</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,7 @@
 @synthesize children;
 @synthesize depth;
 @synthesize cachedReplyCount;
+@synthesize recentIndex;
 
 - (id)init {
   [super init];
@@ -65,6 +66,23 @@
       [children addObject:postObject];
   }
   
+  // get the recent sort index
+  if (parent == nil) {
+    int i;
+    NSMutableArray *sortedByRecent = [[NSMutableArray alloc] initWithObjects:self, nil];
+    
+    for (i = 0; i &lt;= cachedReplyCount; i++) {
+      [sortedByRecent addObject:[self postAtIndex:i]];
+    }
+    [sortedByRecent sortUsingSelector:@selector(compare:)];
+    
+    for (i = 0; i &lt;= cachedReplyCount; i++) {
+      [[sortedByRecent objectAtIndex:i] setRecentIndex:i];
+    }
+    
+    [sortedByRecent release];
+  }
+  
   // Filter post
   if ([self.category isEqualToString:@&quot;ontopic&quot;]) {
     return YES;
@@ -165,4 +183,12 @@
   return [date descriptionWithCalendarFormat:@&quot;%b %d, %Y %I:%M %p&quot; timeZone:nil locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];
 }
 
+- (int)compare:(Post *)otherPost {
+  if (postId &lt; otherPost.postId) {
+    return NSOrderedDescending;
+  } else {
+    return NSOrderedAscending;
+  }
+}
+
 @end</diff>
      <filename>Classes/Post.m</filename>
    </modified>
    <modified>
      <diff>@@ -112,45 +112,6 @@
   [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
 }
 
-/*
- Override if you support editing the list
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-		
-	if (editingStyle == UITableViewCellEditingStyleDelete) {
-		// Delete the row from the data source
-		[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
-	}	
-	if (editingStyle == UITableViewCellEditingStyleInsert) {
-		// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
-	}	
-}
-*/
-
-
-/*
- Override if you support conditional editing of the list
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
-	// Return NO if you do not want the specified item to be editable.
-	return YES;
-}
-*/
-
-
-/*
- Override if you support rearranging the list
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
- Override if you support conditional rearranging of the list
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-	// Return NO if you do not want the item to be re-orderable.
-	return YES;
-}
- */ 
-
 
 - (void)viewWillAppear:(BOOL)animated {
 	[super viewWillAppear:animated];
@@ -177,6 +138,7 @@
 - (void)didReceiveMemoryWarning {
 	[super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
 	// Release anything that's not essential, such as cached data
+  NSLog(@&quot;Received memory warning&quot;);
 }
 
 </diff>
      <filename>Classes/RootViewController.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f851468cdf28b00f7a56c6ffc4682bc9d5cfca19</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/latest-chatty/commit/0743216a0856ee7ace8560ffb036322effd8ee57</url>
  <id>0743216a0856ee7ace8560ffb036322effd8ee57</id>
  <committed-date>2008-08-15T00:14:05-07:00</committed-date>
  <authored-date>2008-08-15T00:14:05-07:00</authored-date>
  <message>* Fade the last 10 posts in a thread so it's easy to see the most recent replies
* Fixed a bug that would return you to the wrong spot in the thread after coming back from the web view</message>
  <tree>bf04b8e87c9fd1f4dc959db75278582c0b1f7fda</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
