WordPress-iOS
WordPress-iOS copied to clipboard
Universal link for Stats opens incorrect site
Expected behavior
It selected the site from the URL and opens Stats
Actual behavior
It opens Stats for the currently selected site.
Steps to reproduce the behavior
- Open the following universal link:
https://<#domain#>.wordpress.com/stats
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]
Thanks for reporting! 👍
RCA
The action is handled by StatsRoute and the .root case, unlike other cases, doesn't contain the code to select a site from the link.
switch self {
case .root:
if let blog = defaultBlog() {
coordinator.showStats(for: blog)
}
case .site:
if let blog = blog(from: values) {
coordinator.showStats(for: blog)
} else {
showStatsForDefaultBlog(from: values, with: coordinator)
}