summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/UserFeedViewModel.cs
diff options
context:
space:
mode:
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; }
+ }
+ }
+}