private async Task GetClients(bool isRefresh) { if (!_navigationService.IsNetworkAvailable || (_dataLoaded && !isRefresh)) { return; } SetProgressBar("Getting clients..."); try { var query = new SessionQuery { ControllableByUserId = AuthenticationService.Current.LoggedInUserId, SupportsRemoteControl = true }; var clients = await _apiClient.GetClientSessionsAsync(query); Clients = clients.Where(x => x.DeviceId != _apiClient.DeviceId && x.SupportsRemoteControl).ToList(); if (!Clients.IsNullOrEmpty()) { if (SelectedClient != null) { SelectedClient = Clients.FirstOrDefault(x => x.DeviceId == SelectedClient.DeviceId) ?? Clients[0]; } else { SelectedClient = Clients[0]; } SetSessionDetails(SelectedClient); _dataLoaded = true; } } catch (HttpException ex) { Log.ErrorException("GetClients()", ex); } SetProgressBar(); }