Fix incorrect check in Selective Sync that prevented folder changes to propagate...
[pithos-ms-client] / trunk / Pithos.Client.WPF / Preferences / AccountViewModel.cs
index 24f02ec..212bef0 100644 (file)
  * -----------------------------------------------------------------------
  */
 #endregion
+
+using System;
 using Caliburn.Micro;
 using Pithos.Interfaces;
 
 namespace Pithos.Client.WPF.Preferences
 {
     /// <summary>
-    /// ViewModel wrapper for an account
+    /// ViewModel wrapper for a settings Account object with change notifications
     /// </summary>
     public class AccountViewModel:PropertyChangedBase
     {
@@ -62,6 +64,10 @@ namespace Pithos.Client.WPF.Preferences
             _account = account;            
         }
 
+        public Uri AccountKey
+        {
+            get { return new Uri(new Uri(_account.ServerUrl) , _account.AccountName); }
+        }
 
         public string AccountName
         {
@@ -120,6 +126,7 @@ namespace Pithos.Client.WPF.Preferences
             set 
             {
                 _account.ApiKey = value;
+                IsExpired = false;
                 NotifyOfPropertyChange(() => ApiKey);
             }
         }