private async void RemoveCollection(RecentCollectionViewModel recent_collection) { logger.Trace($"Removing collection [{recent_collection.Name} - {recent_collection.Filename}]"); if (!recent_collection.Invalid) { var result = (bool)await DialogManager.ShowPromptDialogAsync("Removing Collection", "Do you want to delete it from disk?"); if (result) { repository.DeleteCollection(recent_collection.Filename); } } state_manager.RemoveFromRecentCollections(recent_collection.Obj); RecentCollections.Remove(recent_collection); }
private async void SelectCollection(RecentCollectionViewModel recent_collection) { logger.Trace($"Selected collection [{recent_collection.Name} - {recent_collection.Filename}]"); if (recent_collection.Invalid) { var result = (bool)await DialogManager.ShowPromptDialogAsync("Invalid Collection", "Do you want to remove it from the list?"); if (result) { state_manager.RemoveFromRecentCollections(recent_collection.Obj); RecentCollections.Remove(recent_collection); } } else { var collection = repository.LoadCollection(recent_collection.Filename); state_manager.SetCurrentCollection(collection); MessageBus.Current.SendMessage(NavigationMessage.Books); } }