summaryrefslogtreecommitdiff
path: root/Juick/App.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/App.xaml.cs')
-rw-r--r--Juick/App.xaml.cs25
1 files changed, 18 insertions, 7 deletions
diff --git a/Juick/App.xaml.cs b/Juick/App.xaml.cs
index 69dbe16..4057483 100644
--- a/Juick/App.xaml.cs
+++ b/Juick/App.xaml.cs
@@ -11,18 +11,29 @@ namespace Juick
{
public partial class App : Application
{
- private static MainViewModel viewModel = null;
+ private static MessageListViewModelBase _myfeed = null;
/// <summary>
- /// A static ViewModel used by the views to bind against.
+ /// A static _myfeed used by the views to bind against.
/// </summary>
- /// <returns>The MainViewModel object.</returns>
- public static MainViewModel ViewModel
+ /// <returns>The MessageListViewModelBase object.</returns>
+ public static MessageListViewModelBase MyFeedView
{
get
{
// Delay creation of the view model until necessary
- return viewModel ?? (viewModel = new MainViewModel());
+ return _myfeed ?? (_myfeed = new MessageListViewModelBase());
+ }
+ }
+
+ private static MessageListViewModelBase _last;
+
+ public static MessageListViewModelBase LastView
+ {
+ get
+ {
+ return _last ??
+ (_last = new MessageListViewModelBase {RestUri = "/messages?1=1&rnd=" + Environment.TickCount});
}
}
@@ -93,9 +104,9 @@ namespace Juick
private void Application_Activated(object sender, ActivatedEventArgs e)
{
// Ensure that application state is restored appropriately
- if (!App.ViewModel.IsDataLoaded)
+ if (!App.MyFeedView.IsDataLoaded)
{
- App.ViewModel.LoadData();
+ App.MyFeedView.LoadData();
}
}