private async Task NavigateBackAsync() { if (_currentFolder != null) { IOneDriveStorageFolder currentFolder = null; Shell.Current.DisplayWaitRing = true; try { if (!string.IsNullOrEmpty(_currentFolder.Path)) { currentFolder = await _rootFolder.GetFolderAsync(_currentFolder.Path); } else { currentFolder = _rootFolder; } OneDriveItemsList.ItemsSource = currentFolder.GetItemsAsync(); _currentFolder = currentFolder; } catch (ServiceException ex) { await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex); } finally { Shell.Current.DisplayWaitRing = false; } } }
private async Task NavigateToFolderAsync(IOneDriveStorageItem item) { if (item.IsFolder()) { Shell.Current.DisplayWaitRing = true; try { var currentFolder = await _currentFolder.GetFolderAsync(item.Name); OneDriveItemsList.ItemsSource = currentFolder.GetItemsAsync(); _currentFolder = currentFolder; } catch (ServiceException ex) { await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex); } finally { Shell.Current.DisplayWaitRing = false; } } }