private void FixupModAction(ModAction previousValue) { if (previousValue != null && previousValue.ObjectModMetas.Contains(this)) { previousValue.ObjectModMetas.Remove(this); } if (ModAction != null) { if (!ModAction.ObjectModMetas.Contains(this)) { ModAction.ObjectModMetas.Add(this); } if (CreatedActionID != ModAction.ID) { CreatedActionID = ModAction.ID; } } }
private void FixupModAction3(ModAction previousValue) { if (previousValue != null && previousValue.ObjectModMetas3.Contains(this)) { previousValue.ObjectModMetas3.Remove(this); } if (ModAction3 != null) { if (!ModAction3.ObjectModMetas3.Contains(this)) { ModAction3.ObjectModMetas3.Add(this); } if (AvatarLastChangedActionID != ModAction3.ID) { AvatarLastChangedActionID = ModAction3.ID; } } else if (!_settingFK) { AvatarLastChangedActionID = null; } }
private void FixupModAction2(ModAction previousValue) { if (previousValue != null && previousValue.ObjectModMetas2.Contains(this)) { previousValue.ObjectModMetas2.Remove(this); } if (ModAction2 != null) { if (!ModAction2.ObjectModMetas2.Contains(this)) { ModAction2.ObjectModMetas2.Add(this); } if (DetailsLastChangedActionID != ModAction2.ID) { DetailsLastChangedActionID = ModAction2.ID; } } else if (!_settingFK) { DetailsLastChangedActionID = null; } }
private void FixupModAction1(ModAction previousValue) { if (previousValue != null && previousValue.ObjectModMetas1.Contains(this)) { previousValue.ObjectModMetas1.Remove(this); } if (ModAction1 != null) { if (!ModAction1.ObjectModMetas1.Contains(this)) { ModAction1.ObjectModMetas1.Add(this); } if (DeletedActionID != ModAction1.ID) { DeletedActionID = ModAction1.ID; } } else if (!_settingFK) { DeletedActionID = null; } }
//-- Here there is a difference between the posts Content (which may be a climb) and the post's Place internal Post UpdateContentAddPost(ModAction o) { return UpdateTypedPost(o.OnObjectID, new { Content = GetPostPlace(o.OnObjectID) }); }
internal void DeleteContentAddPost(ModAction o) { DeleteTypedPost(postRepo.GetByID(o.OnObjectID)); }
/// <summary> /// /// </summary> /// <param name="ci"></param> /// <returns></returns> /// <remarks> /// Here we require a placeID because climbs belong to a place so OnObjectID is not a place, it just so happens that /// when we're adding areas and locations placeID == o.OnObjectID /// </remarks> internal Post CreateContentAddPost(ModAction o, Guid placeID, bool isPublic) { var place = AppLookups.GetCacheIndexEntry(placeID); var postMgr = new cf.Content.Feed.V0.ContentAddPostManager(); dynamic data = postMgr.CreateTemplateDynamicData(GetPostPlace(o.OnObjectID)); return postMgr.CreatePost(o.OnObjectID, o.UserID, place, isPublic, data); }