Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: remoting/ios/app/remoting_view_controller.mm

Issue 2914233003: [CRD iOS] Don't attempt to connect to an offline host (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/app/remoting_view_controller.mm
diff --git a/remoting/ios/app/remoting_view_controller.mm b/remoting/ios/app/remoting_view_controller.mm
index 1f28e5e65d82f1f94f86221002092efc3a545f70..443311a2225a3e80384744511864df6b2733203f 100644
--- a/remoting/ios/app/remoting_view_controller.mm
+++ b/remoting/ios/app/remoting_view_controller.mm
@@ -203,6 +203,13 @@ static CGFloat kHostInset = 5.f;
- (void)didSelectCell:(HostCollectionViewCell*)cell
completion:(void (^)())completionBlock {
+ if (![cell.hostInfo isOnline]) {
+ MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init];
+ message.text = @"Host is offline.";
nicholss 2017/06/01 21:56:57 Might be overkill but for now yeah, lets use it.
Yuwei 2017/06/01 22:06:49 Okay. BTW this is what we do on Android #_#
+ [MDCSnackbarManager showMessage:message];
+ return;
+ }
+
_client = [[RemotingClient alloc] init];
[_remotingService.authentication
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698