protected override async void OnViewReady(object view) { switch (ImportType) { case ImportType.File: var importedBook = await _bookManager.ImportBook(); ImportedBooks.Add(importedBook); break; case ImportType.Folder: var importedBooks = await _bookManager.ImportBooks(); ImportedBooks.AddRange(importedBooks); break; } NotifyOfPropertyChange(nameof(ImportedBooks)); ImportingProgressVisibility = false; }
private async void GoToLibrary() { await _eventAggregator.PublishOnUIThreadAsync(new Message <IEnumerable <Book> >(ImportedBooks.Where(x => x.IsImported))); _navigationService.GoBack(); }