<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Icon.png</filename>
    </added>
    <added>
      <filename>Settings.bundle/Icon.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff></diff>
      <filename>Assets/screen1.tif</filename>
    </modified>
    <modified>
      <diff>@@ -77,9 +77,9 @@
   // Find the proper URL based on whether this is a root post or reply
   NSString *urlString;
   if (parentPost) {
-    urlString = [NSString stringWithFormat:@&quot;http://latestchatty.beautifulpixel.com/create/%d/%d.xml&quot;, storyId, parentPost.postId];
+    urlString = [Feed urlStringWithPath:[NSString stringWithFormat:@&quot;create/%d/%d.xml&quot;, storyId, parentPost.postId]];
   } else {
-    urlString = [NSString stringWithFormat:@&quot;http://latestchatty.beautifulpixel.com/create/%d.xml&quot;, storyId];
+    urlString = [Feed urlStringWithPath:[NSString stringWithFormat:@&quot;create/%d.xml&quot;, storyId]];
   }
   
   // Create the request</diff>
      <filename>Classes/ComposeViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -184,7 +184,7 @@
 
 - (IBAction)refresh:(id)sender {
   int postId = (int)currentRoot.postId;
-  [currentRoot release];
+  //[currentRoot release];
   
   currentRoot = [[Post alloc] initWithThreadId:postId];
   currentPost = currentRoot;</diff>
      <filename>Classes/DetailViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,8 @@
   int lastPage;
 }
 
++ (NSString *)urlStringWithPath:(NSString *)path;
+
 - (id)initWithLatestChattyAndDelegate:(id)aDelegate;
 - (id)initWithUrl:(NSString *)urlString delegate:(id)aDelegate;
 - (id)initWithStoryId:(int)aStoryId delegate:(id)aDelegate;</diff>
      <filename>Classes/Feed.h</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,12 @@
 @synthesize storyId;
 @synthesize lastPageLoaded;
 
++ (NSString *)urlStringWithPath:(NSString *)path {
+  return [[[NSUserDefaults standardUserDefaults] stringForKey:@&quot;api_server&quot;] stringByAppendingString:path];
+}
+
+
+
 // Designated Initializer.
 - (id)init {
   [super init];
@@ -31,12 +37,12 @@
 
 // Use the default feed that just includes the latest chatty.
 - (id)initWithLatestChattyAndDelegate:(id)aDelegate {
-  return [self initWithUrl:@&quot;http://latestchatty.beautifulpixel.com/&quot; delegate:aDelegate];
+  return [self initWithUrl:[Feed urlStringWithPath:@&quot;index.xml&quot;] delegate:aDelegate];
 }
 
 // Get a feed for a specific storyId
 - (id)initWithStoryId:(int)aStoryId delegate:(id)aDelegate {
-  return [self initWithUrl:[NSString stringWithFormat:@&quot;http://latestchatty.beautifulpixel.com/%d.xml&quot;, storyId] delegate:aDelegate];
+  return [self initWithUrl:[Feed urlStringWithPath:[NSString stringWithFormat:@&quot;%d.xml&quot;, storyId]] delegate:aDelegate];
 }
 
 - (void)addPostsInFeedWithUrl:(NSString *)urlString {
@@ -62,7 +68,9 @@
   // Parse response into post objects
   NSArray *postElements = [[xml rootElement] nodesForXPath:@&quot;comment&quot; error:nil];
   for (CXMLElement *postXml in [postElements objectEnumerator]) {
-    [posts addObject:[[Post alloc] initWithXmlElement:postXml parent:nil]];
+    Post *postObject = [[Post alloc] initWithXmlElement:postXml parent:nil];
+    if (postObject != nil)
+      [posts addObject:postObject];
   }
   
   storyId         = [[[[xml rootElement] attributeForName:@&quot;story_id&quot;]  stringValue] intValue];
@@ -75,7 +83,7 @@
 - (void)loadNextPage {
   if (lastPageLoaded &lt; lastPage) {
     lastPageLoaded++;
-    [self addPostsInFeedWithUrl:[NSString stringWithFormat:@&quot;http://latestchatty.beautifulpixel.com/%d.%d.xml&quot;, storyId, lastPageLoaded]];
+    [self addPostsInFeedWithUrl:[Feed urlStringWithPath:[NSString stringWithFormat:@&quot;%d.%d.xml&quot;, storyId, lastPageLoaded]]];
   }
 }
 </diff>
      <filename>Classes/Feed.m</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,6 @@
 
 
 - (void)applicationDidFinishLaunching:(UIApplication *)application {
-	
 	// Configure and show the window
 	[window addSubview:[navigationController view]];
 	[window makeKeyAndVisible];</diff>
      <filename>Classes/LatestChattyAppDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@
 //
 
 #import &lt;UIKit/UIKit.h&gt;
+#import &quot;Feed.h&quot;
 #import &quot;TouchXML.h&quot;
 
 @interface Post : NSObject {
@@ -14,6 +15,7 @@
   NSString *author;
   NSString *preview;
   NSString *body;
+  NSString *category;
   NSDate *date;
   int postId;
   NSMutableArray *children;
@@ -33,6 +35,7 @@
 @property (readwrite, copy) NSString *author;
 @property (readwrite, copy) NSString *preview;
 @property (readwrite, copy) NSString *body;
+@property (readwrite, copy) NSString *category;
 @property (readwrite, copy) NSDate *date;
 @property (readwrite) int postId;
 @property (readwrite, retain) NSMutableArray *children;</diff>
      <filename>Classes/Post.h</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,7 @@
 @synthesize author;
 @synthesize preview;
 @synthesize body;
+@synthesize category;
 @synthesize date;
 @synthesize postId;
 @synthesize children;
@@ -30,8 +31,10 @@
   self.postId   = [[[xml attributeForName:@&quot;id&quot;]     stringValue] intValue];
   self.preview  = [[xml attributeForName:@&quot;preview&quot;] stringValue];
   self.body     = [[[xml nodesForXPath:@&quot;body&quot;  error:nil] objectAtIndex:0] stringValue];
-  self.children = [[NSMutableArray alloc] init];
+  self.category = [[xml attributeForName:@&quot;category&quot;] stringValue];
   self.preview  = [self cleanString:self.preview];
+  
+  self.children = [[NSMutableArray alloc] init];
   self.cachedReplyCount = [[[xml attributeForName:@&quot;reply_count&quot;] stringValue] intValue];
   
   if (parent == nil) {
@@ -42,14 +45,25 @@
   
   NSArray *postElements = [xml nodesForXPath:@&quot;comments/comment&quot; error:nil];
   for (CXMLElement *postXml in [postElements objectEnumerator]) {
-    [children addObject:[[Post alloc] initWithXmlElement:postXml parent:self]];
+    Post *postObject = [[Post alloc] initWithXmlElement:postXml parent:self];
+    if (postObject != nil)
+      [children addObject:postObject];
   }
   
-  return self;
+  if ([self.category isEqualToString:@&quot;ontopic&quot;]) {
+    return self;
+  } else {
+    NSLog(@&quot;filter setting for %@, %d&quot;, self.category, (int)[[NSUserDefaults standardUserDefaults] boolForKey:[@&quot;filter_&quot; stringByAppendingString:self.category]]);
+    if ([[NSUserDefaults standardUserDefaults] boolForKey:[@&quot;filter_&quot; stringByAppendingString:self.category]]) {
+      return self;
+    } else {
+      return nil;
+    }
+  }
 }
 
 - (id)initWithThreadId:(int)threadId {
-  NSString *urlString = [NSString stringWithFormat:@&quot;http://latestchatty.beautifulpixel.com/thread/%d.xml&quot;, threadId];
+  NSString *urlString = [Feed urlStringWithPath:[NSString stringWithFormat:@&quot;thread/%d.xml&quot;, threadId]];
   CXMLDocument *xml = [[[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:urlString]
                                                            options:1
                                                              error:nil] autorelease];</diff>
      <filename>Classes/Post.m</filename>
    </modified>
    <modified>
      <diff>@@ -68,7 +68,7 @@
   [self.contentView addSubview:timestamp];
   
   // Post preview
-  preview = [[UILabel alloc] initWithFrame:CGRectMake(5, 18, 285, 38)];
+  preview = [[UILabel alloc] initWithFrame:CGRectMake(5, 18, 310, 38)];
   preview.backgroundColor = [UIColor clearColor];
   preview.numberOfLines = 2;
   preview.font = [UIFont systemFontOfSize:14];
@@ -107,8 +107,10 @@
 }
 
 - (void)updateStatus {
-  if (preview.text == @&quot;Load More&quot;) preview.text = @&quot;&quot;;
-  [activityIndicator startAnimating];
+  if (preview.text == @&quot;Load More&quot;) {
+    preview.text = @&quot;&quot;;
+    [activityIndicator startAnimating];
+  }
 }
 
 </diff>
      <filename>Classes/RootPostCellView.m</filename>
    </modified>
    <modified>
      <diff>@@ -58,21 +58,21 @@
 		&lt;/dict&gt;
 		&lt;dict&gt;
 			&lt;key&gt;Title&lt;/key&gt;
-			&lt;string&gt;Not Work Safe&lt;/string&gt;
+			&lt;string&gt;NWS&lt;/string&gt;
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
 			&lt;key&gt;Key&lt;/key&gt;
-			&lt;string&gt;filterNotWorkSafe&lt;/string&gt;
+			&lt;string&gt;filter_nws&lt;/string&gt;
 			&lt;key&gt;DefaultValue&lt;/key&gt;
-			&lt;true/&gt;
+			&lt;false/&gt;
 		&lt;/dict&gt;
 		&lt;dict&gt;
 			&lt;key&gt;Title&lt;/key&gt;
-			&lt;string&gt;Random&lt;/string&gt;
+			&lt;string&gt;Random / Stupid&lt;/string&gt;
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
 			&lt;key&gt;Key&lt;/key&gt;
-			&lt;string&gt;filterRandom&lt;/string&gt;
+			&lt;string&gt;filter_stupid&lt;/string&gt;
 			&lt;key&gt;DefaultValue&lt;/key&gt;
 			&lt;true/&gt;
 		&lt;/dict&gt;
@@ -82,7 +82,7 @@
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
 			&lt;key&gt;Key&lt;/key&gt;
-			&lt;string&gt;filterInteresting&lt;/string&gt;
+			&lt;string&gt;filter_interesting&lt;/string&gt;
 			&lt;key&gt;DefaultValue&lt;/key&gt;
 			&lt;true/&gt;
 		&lt;/dict&gt;
@@ -92,7 +92,7 @@
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
 			&lt;key&gt;Key&lt;/key&gt;
-			&lt;string&gt;filterPolitical&lt;/string&gt;
+			&lt;string&gt;filter_political&lt;/string&gt;
 			&lt;key&gt;DefaultValue&lt;/key&gt;
 			&lt;true/&gt;
 		&lt;/dict&gt;
@@ -102,10 +102,34 @@
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
 			&lt;key&gt;Key&lt;/key&gt;
-			&lt;string&gt;filterOffTopic&lt;/string&gt;
+			&lt;string&gt;filter_offtopic&lt;/string&gt;
 			&lt;key&gt;DefaultValue&lt;/key&gt;
 			&lt;true/&gt;
 		&lt;/dict&gt;
+		&lt;dict&gt;
+			&lt;key&gt;Title&lt;/key&gt;
+			&lt;string&gt;Server&lt;/string&gt;
+			&lt;key&gt;Type&lt;/key&gt;
+			&lt;string&gt;PSGroupSpecifier&lt;/string&gt;
+		&lt;/dict&gt;
+		&lt;dict&gt;
+			&lt;key&gt;Type&lt;/key&gt;
+			&lt;string&gt;PSTextFieldSpecifier&lt;/string&gt;
+			&lt;key&gt;Title&lt;/key&gt;
+			&lt;string&gt;Feed Server&lt;/string&gt;
+			&lt;key&gt;Key&lt;/key&gt;
+			&lt;string&gt;api_server&lt;/string&gt;
+			&lt;key&gt;DefaultValue&lt;/key&gt;
+			&lt;string&gt;http://ws.shackschatty.com/&lt;/string&gt;
+			&lt;key&gt;IsSecure&lt;/key&gt;
+			&lt;false/&gt;
+			&lt;key&gt;KeyboardType&lt;/key&gt;
+			&lt;string&gt;URL&lt;/string&gt;
+			&lt;key&gt;AutocapitalizationType&lt;/key&gt;
+			&lt;string&gt;None&lt;/string&gt;
+			&lt;key&gt;AutocorrectionType&lt;/key&gt;
+			&lt;string&gt;No&lt;/string&gt;
+		&lt;/dict&gt;
 	&lt;/array&gt;
 &lt;/dict&gt;
 &lt;/plist&gt;</diff>
      <filename>Settings.bundle/Root.plist</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5a3978bb5c4db653690474e75dd055c19c620170</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/latest-chatty/commit/d1016814923dabb3843d69fc200d8808f59dad2c</url>
  <id>d1016814923dabb3843d69fc200d8808f59dad2c</id>
  <committed-date>2008-08-07T19:26:25-07:00</committed-date>
  <authored-date>2008-08-07T19:26:25-07:00</authored-date>
  <message>Added API source as a setting</message>
  <tree>c1b29c6faf086855f73a8e3b752a7929c2556f23</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
