ksandyasa / google-api-objectivec-client

Automatically exported from code.google.com/p/google-api-objectivec-client
0 stars 0 forks source link

GTMOAuth2ViewControllerTouch displays back and forward buttons even if they won't do anything #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
GTMOAuth2ViewControllerTouch displays (quite ugly) back and forward buttons 
even if they won't do anything, confusing users

diff --git 
a/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m b/Dependencies/google-api-objectivec-client/Source/OAuth2/T
index b1c9612..e99a5c8 100644
--- 
a/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m
+++ 
b/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m
@@ -718,6 +718,9 @@ static Class gSignInClass = Nil;
   [self saveBrowserCookies];
   [self clearSpecifiedBrowserCookies];

+       self.backButton.hidden = YES;
+       self.forwardButton.hidden = YES;
+
   if (!isViewShown_) {
     isViewShown_ = YES;
     if ([self isNavigationBarTranslucent]) {
@@ -842,6 +845,9 @@ static Class gSignInClass = Nil;

     [self updateUI];
   }
+
+       self.forwardButton.hidden = ![webView canGoForward];
+       self.backButton.hidden = ![webView canGoBack];
 }

 - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {

Original issue reported on code.google.com by mayer.ju...@gmail.com on 31 Jan 2014 at 10:31

GoogleCodeExporter commented 9 years ago
I am having the same issue. Have you found a solution to this?

Original comment by ra...@fireflykb.com on 16 May 2015 at 1:24

GoogleCodeExporter commented 9 years ago
the solution is right in front of you, after all i've posted the patch

Original comment by mayer.ju...@gmail.com on 16 May 2015 at 8:19