Skip to content

Commit

Permalink
Merge pull request #86 from contentstack/staging
Browse files Browse the repository at this point in the history
Master | DX-1918
  • Loading branch information
nadeem-cs authored Dec 19, 2024
2 parents 6b6f52f + ccf24d6 commit 9193293
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
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>

0 comments on commit 9193293

Please sign in to comment.