[Stats Refresh] Post Stats: show web view when post title tapped - #11499
Merged
Conversation
45 tasks
ghost
reviewed
Apr 18, 2019
| let changeDispatcher = Dispatcher<Void>() | ||
| private var postTitle: String? | ||
| private var postURL: URL? | ||
| private weak var postStatsDelegate: PostStatsDelegate? |
ghost
reviewed
Apr 18, 2019
| extension PostStatsTableViewController: PostStatsDelegate { | ||
|
|
||
| func displayWebViewWithURL(_ url: URL) { | ||
| let webViewController = WebViewControllerFactory.controllerAuthenticatedWithDefaultAccount(url: url) |
ghost
reviewed
Apr 18, 2019
| func displayWebViewWithURL(_ url: URL) { | ||
| let webViewController = WebViewControllerFactory.controllerAuthenticatedWithDefaultAccount(url: url) | ||
| let navController = UINavigationController.init(rootViewController: webViewController) | ||
| present(navController, animated: true, completion: nil) |
There was a problem hiding this comment.
Fun fact: the completion handler of present(_:animated:completion:) has a default parameter value of nil. So, you could delete that if you were so inclined.
Contributor
Author
There was a problem hiding this comment.
Ah, cool. Thanks! I took the liberty of removing that param from all the Stats displayWebViewWithURL methods.
ghost
reviewed
Apr 18, 2019
ghost
approved these changes
Apr 18, 2019
ghost
left a comment
There was a problem hiding this comment.
Hey @ScoutHarris - I left one nitpicky suggestion regarding a default method parameter, but I can confirm the following:
✅ Branch builds & tests pass
✅ I am able to manually step through the outlined sequences and see the web view controller in each of them.
Nice work! ![]()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11344
When on Post Stats, tapping the post title will now open a web view for that post.
To test: