Dr0ptp4kt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189869

Change subject: Merge "Add library license links to about page."
......................................................................

Merge "Add library license links to about page."

Change-Id: I19be65de22a187b6d53f83ce92596de6f38c6d1f
---
M wikipedia/View Controllers/About/AboutViewController.m
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/69/189869/1

diff --git a/wikipedia/View Controllers/About/AboutViewController.m 
b/wikipedia/View Controllers/About/AboutViewController.m
index b3d9a9a..42f3c13 100644
--- a/wikipedia/View Controllers/About/AboutViewController.m
+++ b/wikipedia/View Controllers/About/AboutViewController.m
@@ -9,6 +9,8 @@
 #import "NSString+Extras.h"
 #import <BlocksKit/BlocksKit.h>
 #import "ModalContentViewController.h"
+#import "TopMenuTextFieldContainer.h"
+#import "TopMenuTextField.h"
 
 static NSString* const kWMFAboutHTMLFile = @"about.html";
 static NSString* const kWMFAboutPlistName = @"AboutViewController";
@@ -82,13 +84,11 @@
 
 - (void)updateNavigationBar{
     
-    /*
-     HACK: This is pretty terrible. The current VC should not need to know 
about the containing view controller to set its nav bar buttons and title.
-     We really need to change the modal display logic to make sure modal VCs 
can update their navigation bar.
-     That is obviously a pretty big refactor and effects several VCs - so not 
doing that here. In the mean time, we are casting what we know the containing 
VC to be so we can make the needed changes.
-     */
-    [(ModalContentViewController*)self.parentViewController 
setNavBarMode:self.navBarMode];
-    [(ModalContentViewController*)self.parentViewController 
setTopMenuText:self.title];
+    // TODO: let VCs update the navigation bar, inverting control
+    
+    self.topMenuViewController.navBarMode = self.navBarMode;
+    TopMenuTextFieldContainer *textFieldContainer = 
[self.topMenuViewController getNavBarItem:NAVBAR_TEXT_FIELD];
+    textFieldContainer.textField.text = self.title;
 }
 
 - (void)navItemTappedNotification:(NSNotification *)notification

-- 
To view, visit https://gerrit.wikimedia.org/r/189869
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19be65de22a187b6d53f83ce92596de6f38c6d1f
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to