summaryrefslogtreecommitdiff
path: root/Juick/ThreadView.xaml.cs
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2012-03-10 22:14:25 +0400
committerGravatar Vitaly Takmazov2012-03-10 22:14:25 +0400
commit2b387fb5626a57e3a6473eed66816df80152cd49 (patch)
tree0b2f2ede5dcc79c1adbb8b64c2296aaeed1416fb /Juick/ThreadView.xaml.cs
parent4a664984f58b00493a61cb19fafc0ca01d35b930 (diff)
refactoring, tags
Diffstat (limited to 'Juick/ThreadView.xaml.cs')
-rw-r--r--Juick/ThreadView.xaml.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Juick/ThreadView.xaml.cs b/Juick/ThreadView.xaml.cs
index c984dd1..eac9813 100644
--- a/Juick/ThreadView.xaml.cs
+++ b/Juick/ThreadView.xaml.cs
@@ -12,11 +12,11 @@ namespace Juick
public ThreadView()
{
InitializeComponent();
- model = new ThreadViewModel();
- DataContext = model;
+ Model = new ThreadViewModel();
+ DataContext = Model;
}
- public ThreadViewModel model;
+ public ThreadViewModel Model;
// When page is navigated to set data context to selected item in list
protected override void OnNavigatedTo(NavigationEventArgs e)
@@ -31,8 +31,8 @@ namespace Juick
if (NavigationContext.QueryString.TryGetValue("mid", out _mid))
{
int MID = int.Parse(_mid);
- model.Root = last ? App.ViewModel.Last.Single(i => i.MID == MID) : App.ViewModel.MyFeed.Single(i => i.MID == MID);
- model.LoadData();
+ Model.Mid = last ? App.LastView.Items.Single(i => i.MID == MID).MID : App.MyFeedView.Items.Single(i => i.MID == MID).MID;
+ Model.LoadData();
}
}
@@ -43,7 +43,7 @@ namespace Juick
return;
// Navigate to the new page
- var item = model.Items[((ListBox) sender).SelectedIndex];
+ var item = Model.Items[((ListBox) sender).SelectedIndex];
var destUri = string.Format("/NewPostView.xaml?mid={0}", item.MID);
if (item.RID > 0)
destUri += string.Format("&rid={0}", item.RID);