Commit f8085cad authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[CRD iOS] Fix UI glitch when refreshing host list while HostSetupView is showing

Currently we don't show the FetchingView (just a spinner on the center)
when refreshing host list while the host list is already shown, but we
haven't done that for the HostSetupView. If the user reactivates the app
from background while HostSetupView is being show, we will show the
FetchingView very quick then almost immediately show the HostSetupView.
Given that we already have a pull-to-refresh controll/UI for the
HostSetupView, we don't need to show the FetchingView at all for
HostSetupView.

Bug: 832905
Change-Id: I8b4f74c3983f35612be9a565881b85b0760ba1c1
Reviewed-on: https://chromium-review.googlesource.com/1013042Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550781}
parent 16a8e9e4
......@@ -345,11 +345,12 @@ animationControllerForDismissedController:(UIViewController*)dismissed {
- (void)refreshContent {
if (_hostListService->state() == HostListService::State::FETCHING) {
// We don't need to show the fetching view when host list is being fetched
// while the previous host list is already on screen. Refresh control will
// handle the user-triggered refresh, and we don't need to show anything if
// We don't need to show the fetching view when either the host list or the
// setup view is already shown. Refresh control will handle the
// user-triggered refresh, and we don't need to show anything if
// that's a background refresh (e.g. user just closed the session).
if (self.contentViewController != _collectionViewController) {
if (self.contentViewController != _collectionViewController &&
self.contentViewController != _setupViewController) {
self.contentViewController = _fetchingViewController;
}
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment