2
0

Stop showing thanks tips after user opens thanks page.

This commit is contained in:
Maarten Billemont 2014-09-28 22:25:48 -04:00
parent 41b3964363
commit 3065433a37
3 changed files with 7 additions and 3 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 16ec9a246b7a3b89b77b71aaa276a4bf73811119
Subproject commit c51961c161f571572fa1c83d84923e0f2f4b46ad

View File

@ -79,6 +79,7 @@ typedef NS_ENUM( NSUInteger, MPActiveUserState ) {
self.preferencesTipContainer.alpha = 0;
[self setActive:YES animated:NO];
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"tipped.thanks"])
[self showTips:MPUsersThanksTip];
}
@ -837,7 +838,7 @@ referenceSizeForFooterInSection:(NSInteger)section {
break;
}
case MPActiveUserStateMinimized: {
if (YES || ![[NSUserDefaults standardUserDefaults] boolForKey:@"tipped.passwordsPreferences"])
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"tipped.passwordsPreferences"])
[self showTips:MPUsersPreferencesTip];
break;

View File

@ -50,6 +50,9 @@
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType {
if ([[request.URL absoluteString] rangeOfString:@"thanks.lhunath.com"].location != NSNotFound)
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"tipped.thanks"];
if ([request.URL isEqual:request.mainDocumentURL]) {
self.webNavigationItem.title = request.URL.host;
self.webNavigationItem.prompt = strl( @"Loading" );