summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/UserFeedViewModel.cs
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-10-09 00:44:46 +0400
committerGravatar Vitaly Takmazov2013-10-09 00:44:46 +0400
commitc63da7c62138965840592c619a67432a83f01fab (patch)
tree36f76a101d71e211663df6fb0ab9b05d1d7f960f /Juick/ViewModels/UserFeedViewModel.cs
parenta9a2c4d856dea88697e688f990144bee0448af2c (diff)
parent1a9bcf2f3ac5f40e8966fb365741d36906fd2e52 (diff)
Merge branch 'master' of bitbucket.org:vitalyster/juick-windowsphone
Diffstat (limited to 'Juick/ViewModels/UserFeedViewModel.cs')
-rw-r--r--Juick/ViewModels/UserFeedViewModel.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/Juick/ViewModels/UserFeedViewModel.cs b/Juick/ViewModels/UserFeedViewModel.cs
new file mode 100644
index 0000000..597687f
--- /dev/null
+++ b/Juick/ViewModels/UserFeedViewModel.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Juick.Classes;
+using JuickApi;
+
+namespace Juick.ViewModels
+{
+ public class UserFeedViewModel : PageViewModel
+ {
+ public UserFeedViewModel(AppViewModel context) : base(context)
+ {
+
+ }
+ static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName<ThreadViewModel>(x => x.Caption);
+
+ private int _uid;
+ public int Uid
+ {
+ get { return _uid; }
+ set
+ {
+ _uid = value;
+ RestUri = string.Format("/messages?user_id={0}", _uid);
+ NotifyPropertyChanged(CaptionPropertyName);
+ }
+ }
+
+ public override string Caption
+ {
+ get { return Items.Count == 0 ? "": Items[0].Username; }
+ }
+ }
+}