Permalink
Browse files

Prevent excluded sharers from being placed in favorites.

  • Loading branch information...
1 parent ec76edf commit a4638fb7766604f9dce9e61eebd09734251f544b @drewjw81 drewjw81 committed Feb 20, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 Classes/ShareKit/Core/SHK.m
@@ -372,6 +372,15 @@ + (NSArray *)favoriteSharersForType:(SHKShareType)type
+ (void)pushOnFavorites:(NSString *)className forType:(SHKShareType)type
{
+ NSArray *exclusions = [[NSUserDefaults standardUserDefaults] objectForKey:@"SHKExcluded"];
+ if (exclusions != nil)
+ {
+ for(NSString *sharerId in exclusions)
+ {
+ if([className isEqualToString:sharerId]) return;
+ }
+ }
+
NSMutableArray *favs = [[self favoriteSharersForType:type] mutableCopy];
[favs removeObject:className];

0 comments on commit a4638fb

Please sign in to comment.