mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2024-12-28 03:00:17 +00:00
bug in lazy portfolio repo stuff
This commit is contained in:
parent
b6bee8f594
commit
21e07938b2
2 changed files with 7 additions and 1 deletions
|
@ -3,10 +3,12 @@ using System.Collections.Generic;
|
||||||
using Android.App;
|
using Android.App;
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
|
using Android.Util;
|
||||||
using Android.Views;
|
using Android.Views;
|
||||||
using Android.Widget;
|
using Android.Widget;
|
||||||
using MonoStockPortfolio.Framework;
|
using MonoStockPortfolio.Framework;
|
||||||
using MonoStockPortfolio.Presenters;
|
using MonoStockPortfolio.Presenters;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace MonoStockPortfolio.Activites
|
namespace MonoStockPortfolio.Activites
|
||||||
{
|
{
|
||||||
|
@ -33,6 +35,10 @@ namespace MonoStockPortfolio.Activites
|
||||||
|
|
||||||
public void RefreshList(IList<string> portfolioNames)
|
public void RefreshList(IList<string> portfolioNames)
|
||||||
{
|
{
|
||||||
|
foreach (var portfolioName in portfolioNames)
|
||||||
|
{
|
||||||
|
Log.Info("RefreshList", portfolioName);
|
||||||
|
}
|
||||||
var listAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, portfolioNames);
|
var listAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, portfolioNames);
|
||||||
PortfolioListView.Adapter = listAdapter;
|
PortfolioListView.Adapter = listAdapter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace MonoStockPortfolio.Presenters
|
||||||
|
|
||||||
public void RefreshPortfolioList()
|
public void RefreshPortfolioList()
|
||||||
{
|
{
|
||||||
|
_portfolios = null;
|
||||||
var portfolioNames = Portfolios.Select(p => p.Name).ToList();
|
var portfolioNames = Portfolios.Select(p => p.Name).ToList();
|
||||||
_currentView.RefreshList(portfolioNames);
|
_currentView.RefreshList(portfolioNames);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +45,6 @@ namespace MonoStockPortfolio.Presenters
|
||||||
|
|
||||||
public void ViewPortfolio(int portfolioPosition)
|
public void ViewPortfolio(int portfolioPosition)
|
||||||
{
|
{
|
||||||
// why is _currentView null?
|
|
||||||
_currentView.StartViewPortfolioActivity(Portfolios[portfolioPosition].ID ?? -1);
|
_currentView.StartViewPortfolioActivity(Portfolios[portfolioPosition].ID ?? -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue