Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #42 from barijaona/experimental

Bug fixes
  • Loading branch information...
commit 88c7a1636dcca4843828a409a2a977efcbe684a3 2 parents a882a0a + c735358
Michael G. Ströck authored April 15, 2012
1  AppController.m
@@ -2502,7 +2502,6 @@ -(void)viewArticlePages:(id)sender inPreferredBrowser:(BOOL)usePreferredBrowser
2502 2502
 	
2503 2503
 	if ([articleArray count] > 0) 
2504 2504
 	{
2505  
-		Preferences * prefs = [Preferences standardPreferences];
2506 2505
 		
2507 2506
         NSMutableArray * articlesWithLinks = [NSMutableArray arrayWithCapacity:[articleArray count]];
2508 2507
         NSMutableArray * urls = [NSMutableArray arrayWithCapacity:[articleArray count]];
6  ArticleController.m
@@ -338,9 +338,8 @@ -(void)reloadArrayOfArticles
338 338
 	
339 339
 	[[RefreshManager articlesUpdateSemaphore] lock];
340 340
 	Folder * folder = [[Database sharedDatabase] folderFromID:currentFolderId];
341  
-	[[RefreshManager articlesUpdateSemaphore] unlock];
342  
-
343 341
 	folderArrayOfArticles = [[folder articlesWithFilter:[[NSApp delegate] filterString]] retain];
  342
+	[[RefreshManager articlesUpdateSemaphore] unlock];
344 343
 	
345 344
 	[self refilterArrayOfArticles];
346 345
 }
@@ -724,9 +723,10 @@ -(NSArray *)wrappedMarkAllReadInArray:(NSArray *)folderArray withUndo:(BOOL)undo
724 723
 		}
725 724
 		else
726 725
 		{
  726
+			// Google Reader feeds and smart folders
727 727
 			// For smart folders, we only mark all read the current folder to
728 728
 			// simplify things.
729  
-			if (undoFlag && (folderId == currentFolderId))
  729
+			if (undoFlag && (IsGoogleReaderFolder(folder) || folderId == currentFolderId))
730 730
 			{
731 731
 				[refArray addObjectsFromArray:currentArrayOfArticles];
732 732
 				[self innerMarkReadByArray:currentArrayOfArticles readFlag:YES];
5  GoogleReader.m
@@ -30,6 +30,7 @@
30 30
 #import "Message.h"
31 31
 #import "AppController.h"
32 32
 #import "RefreshManager.h"
  33
+#import "Preferences.h"
33 34
 
34 35
 //Vienna keychain Google Reader name
35 36
 static NSString *const kKeychainItemName = @"OAuth2 Vienna: Google Reader";
@@ -268,6 +269,8 @@ - (void)feedRequestDone:(ASIHTTPRequest *)request
268 269
 							
269 270
 			// Set the last update date for this folder.
270 271
 			[db setFolderLastUpdate:[refreshedFolder itemId] lastUpdate:[NSDate date]];
  272
+			// Set the HTML homepage for this folder.
  273
+			[db setFolderHomePage:[refreshedFolder itemId] newHomePage:[[[dict objectForKey:@"alternate"] objectAtIndex:0] objectForKey:@"href"]];
271 274
 		[[RefreshManager articlesUpdateSemaphore] unlock];
272 275
 		
273 276
 		// Add to count of new articles so far
@@ -452,6 +455,8 @@ -(void)handleGoogleLoginRequest
452 455
 
453 456
 -(void)authenticate 
454 457
 {    	
  458
+	if (![[Preferences standardPreferences] syncGoogleReader])
  459
+		return;
455 460
 	if (googleReaderStatus != notAuthenticated) {
456 461
 		LLog(@"Another instance is authenticating...");
457 462
 		return;
2  RefreshManager.h
@@ -38,7 +38,7 @@
38 38
 }
39 39
 
40 40
 +(RefreshManager *)sharedManager;
41  
-+ (NSLock *)articlesUpdateSemaphore;
  41
++ (NSRecursiveLock *)articlesUpdateSemaphore;
42 42
 -(void)refreshFolderIconCacheForSubscriptions:(NSArray *)foldersArray;
43 43
 //-(void)refreshSubscriptions:(NSArray *)foldersArray ignoringSubscriptionStatus:(BOOL)ignoreSubStatus;
44 44
 -(void)refreshSubscriptionsAfterRefresh:(NSArray *)foldersArray ignoringSubscriptionStatus:(BOOL)ignoreSubStatus;
6  RefreshManager.m
@@ -36,7 +36,7 @@
36 36
 
37 37
 // Singleton
38 38
 static RefreshManager * _refreshManager = nil;
39  
-static NSLock * articlesUpdate_lock;
  39
+static NSRecursiveLock * articlesUpdate_lock;
40 40
 
41 41
 // Private functions
42 42
 @interface RefreshManager (Private)
@@ -62,10 +62,10 @@ @implementation RefreshManager
62 62
 + (void)initialize
63 63
 {
64 64
     // Initializes our multi-thread lock
65  
-    articlesUpdate_lock = [[NSLock alloc] init];
  65
+    articlesUpdate_lock = [[NSRecursiveLock alloc] init];
66 66
 }
67 67
 
68  
-+ (NSLock *)articlesUpdateSemaphore
  68
++ (NSRecursiveLock *)articlesUpdateSemaphore
69 69
 {
70 70
     return articlesUpdate_lock;
71 71
 }
1  SyncPreferences.m
@@ -46,6 +46,7 @@ -(IBAction)changeSyncGoogleReader:(id)sender
46 46
     BOOL sync = [sender state] == NSOnState;
47 47
 	[[Preferences standardPreferences] setSyncGoogleReader:sync];
48 48
 	if (sync) {
  49
+		[[GoogleReader sharedManager] authenticate];
49 50
 		[[GoogleReader sharedManager] loadSubscriptions:nil];
50 51
 	}
51 52
 }
4  Vienna.xcodeproj/project.pbxproj
@@ -4047,7 +4047,7 @@
4047 4047
 				ONLY_ACTIVE_ARCH = YES;
4048 4048
 				PRODUCT_NAME = ViennaBeta;
4049 4049
 				SDKROOT = macosx;
4050  
-				VIENNA_VERSION_NUMBER = 2807;
  4050
+				VIENNA_VERSION_NUMBER = 2808;
4051 4051
 				WRAPPER_EXTENSION = app;
4052 4052
 			};
4053 4053
 			name = Development;
@@ -4075,7 +4075,7 @@
4075 4075
 				PRODUCT_NAME = ViennaBeta;
4076 4076
 				SDKROOT = macosx;
4077 4077
 				STRIP_INSTALLED_PRODUCT = YES;
4078  
-				VIENNA_VERSION_NUMBER = 2807;
  4078
+				VIENNA_VERSION_NUMBER = 2808;
4079 4079
 				WRAPPER_EXTENSION = app;
4080 4080
 			};
4081 4081
 			name = Deployment;

0 notes on commit 88c7a16

Please sign in to comment.
Something went wrong with that request. Please try again.