Fixes up nullable State, fixes up tracking global query strings in case they are removed by other routes
This commit is contained in:
@@ -20,6 +20,9 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "createDate")]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean indicating if this item is published or not based on it's <see cref="State"/>
|
||||
/// </summary>
|
||||
[DataMember(Name = "published")]
|
||||
public bool Published => State == ContentSavedState.Published || State == ContentSavedState.PublishedPendingChanges;
|
||||
|
||||
@@ -42,9 +45,15 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The saved/published state of an item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is nullable since it's only relevant for content (non-content like media + members will be null)
|
||||
/// </remarks>
|
||||
[DataMember(Name = "state")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ContentSavedState State { get; set; }
|
||||
public ContentSavedState? State { get; set; }
|
||||
|
||||
protected bool Equals(ContentItemBasic other)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user