summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/ThreadViewModel.cs
blob: ec1f92d8da54a9c037a443ea56e5178c1b2f864e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Juick.Classes;

namespace Juick.ViewModels
{
    public class ThreadViewModel : MessageListViewModelBase
    {
        static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName<ThreadViewModel>(x => x.Caption);

        private int _mid;
        public int Mid
        {
            get { return _mid; }
            set 
            { 
                _mid = value;
                RestUri = string.Format("/thread?mid={0}", _mid);
                NotifyPropertyChanged(CaptionPropertyName);
            }
        }

        public override string Caption {
            get { return "#" + _mid; }
        }
    }
}