public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            UserGroupHeader userGroupHeader = item as UserGroupHeader;

            if (userGroupHeader != null && userGroupHeader.GroupHeader != null)
            {
                return(this.GroupTemplate);
            }
            return(this.UserTemplate);
        }
Ejemplo n.º 2
0
 public void Handle(SubscriptionCancelled message)
 {
     if (this._userOrGroupId != AppGlobalStateManager.Current.LoggedInUserId || this._isGroup || !this._subscriptions)
     {
         return;
     }
     Execute.ExecuteOnUIThread((Action)(() =>
     {
         UserGroupHeader userGroupHeader = this.FollowersVM.Collection.FirstOrDefault <UserGroupHeader>((Func <UserGroupHeader, bool>)(f =>
         {
             if (f.UserHeader != null)
             {
                 return(f.UserHeader.UserId == message.UserId);
             }
             return(false);
         }));
         if (userGroupHeader == null)
         {
             return;
         }
         this.FollowersVM.Delete(userGroupHeader);
     }));
 }