From 21e07938b212dd08b26dbc9859e90dfe0f82bae8 Mon Sep 17 00:00:00 2001 From: "Matthew D. Groves" Date: Sun, 6 Mar 2011 23:33:40 -0500 Subject: [PATCH] bug in lazy portfolio repo stuff --- MonoStockPortfolio/Activites/MainActivity.cs | 6 ++++++ MonoStockPortfolio/Presenters/MainPresenter.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/MonoStockPortfolio/Activites/MainActivity.cs b/MonoStockPortfolio/Activites/MainActivity.cs index 564e1d3..dc0b57a 100644 --- a/MonoStockPortfolio/Activites/MainActivity.cs +++ b/MonoStockPortfolio/Activites/MainActivity.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using Android.App; using Android.Content; using Android.OS; +using Android.Util; using Android.Views; using Android.Widget; using MonoStockPortfolio.Framework; using MonoStockPortfolio.Presenters; +using System.Linq; namespace MonoStockPortfolio.Activites { @@ -33,6 +35,10 @@ namespace MonoStockPortfolio.Activites public void RefreshList(IList portfolioNames) { + foreach (var portfolioName in portfolioNames) + { + Log.Info("RefreshList", portfolioName); + } var listAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, portfolioNames); PortfolioListView.Adapter = listAdapter; } diff --git a/MonoStockPortfolio/Presenters/MainPresenter.cs b/MonoStockPortfolio/Presenters/MainPresenter.cs index 1ffb620..eb96aad 100644 --- a/MonoStockPortfolio/Presenters/MainPresenter.cs +++ b/MonoStockPortfolio/Presenters/MainPresenter.cs @@ -33,6 +33,7 @@ namespace MonoStockPortfolio.Presenters public void RefreshPortfolioList() { + _portfolios = null; var portfolioNames = Portfolios.Select(p => p.Name).ToList(); _currentView.RefreshList(portfolioNames); } @@ -44,7 +45,6 @@ namespace MonoStockPortfolio.Presenters public void ViewPortfolio(int portfolioPosition) { - // why is _currentView null? _currentView.StartViewPortfolioActivity(Portfolios[portfolioPosition].ID ?? -1); }