Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Version: 2.20.0
#### Date: Dec-19-2024

##### Fix:
- Reset `LivePreviewConfig` to prevent overwriting fetched data with live preview data during regular fetch calls.

### Version: 2.19.0
#### Date: Nov-30-2024

Expand Down
6 changes: 4 additions & 2 deletions Contentstack.Core/ContentstackClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ public void SetHeader(string key, string value)
/// </example>
public async Task LivePreviewQueryAsync(Dictionary<string, string> query)
{
this.LivePreviewConfig.LivePreview = null;
this.LivePreviewConfig.ContentTypeUID = null;
this.LivePreviewConfig.EntryUID = null;

if (query.Keys.Contains("content_type_uid"))
{
string contentTypeUID = null;
Expand All @@ -572,8 +576,6 @@ public async Task LivePreviewQueryAsync(Dictionary<string, string> query)
string hash = null;
query.TryGetValue("live_preview", out hash);
this.LivePreviewConfig.LivePreview = hash;
} else {
this.LivePreviewConfig.LivePreview = "init";
}
this.LivePreviewConfig.PreviewResponse = await GetLivePreviewData();
}
Expand Down
2 changes: 1 addition & 1 deletion Contentstack.Core/Internals/HttpRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task<string> ProcessRequest(string Url, Dictionary<string, object>
var request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "GET";
request.ContentType = "application/json";
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.19.0";
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.20.0";
request.Timeout = timeout;

if (proxy != null)
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>2.19.0</Version>
<Version>2.20.0</Version>
</PropertyGroup>
</Project>
Loading